Req #36874 [Asn->Wfx]: PDO_PGSQL quote null change
| From: | willfitch@php.net | Date: | Mon, 30 Dec 2013 04:21:05 +0000 |
| Subject: | Req #36874 [Asn->Wfx]: PDO_PGSQL quote null change | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183493@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=36874&edit=1
ID: 36874
Updated by: willfitch@php.net
Reported by: stochnagara at hotmail dot com
Summary: PDO_PGSQL quote null change
-Status: Assigned
+Status: Wont fix
Type: Feature/Change Request
Package: PDO related
Operating System: win xp
PHP Version: 5.1.3RC1
Assigned To: willfitch
Block user comment: N
Private report: N
New Comment:
Going to close this for now. I would suggest a full-blown RFC for this change. This would affect
every driver under PDO, and it outside of the scope of pgsql.
Previous Comments:
------------------------------------------------------------------------
[2013-11-04 22:28:44] willfitch@php.net
The only way we'll be able to implement this feature is to change the quote function at the PDO
layer to accept a zval. However, this will require changes in each of the drivers.
------------------------------------------------------------------------
[2013-10-29 19:09:30] willfitch@php.net
The issue with the specific case is that PDO converts the NULL to an empty string prior to pdo_pgsql
has the opportunity to analyze it. In pgsql_handle_quoter, the unquoted value is an empty string.
I'll look at the impact this would have on other drivers to pass NULL and PDO_PARAM_NULL for
paramtype.
------------------------------------------------------------------------
[2006-03-27 16:27:27] stochnagara at hotmail dot com
Description:
------------
Currently PDO quotes null value as a string '' . I suggest to change this behaviour and
quote null as sql NULL.
Reproduce code:
---------------
<?
$pdo = new PDO('pgsql:...', 'root', '');
var_dump ($pdo->quote (null));
Expected result:
----------------
null
Actual result:
--------------
string ('')
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=36874&edit=1