Req #36874 [Com]: PDO_PGSQL quote null change

From: Date: Tue, 29 Oct 2013 19:09:31 +0000
Subject: Req #36874 [Com]: PDO_PGSQL quote null change
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182479@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 Comment by: willfitch@php.net Reported by: stochnagara at hotmail dot com Summary: PDO_PGSQL quote null change Status: Assigned 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: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#182479) next »