Bug #71885 [NEW]: PostgreSQL has questin mark operator. This collide with PDO placeholder

From: Date: Wed, 23 Mar 2016 09:16:15 +0000
Subject: Bug #71885 [NEW]: PostgreSQL has questin mark operator. This collide with PDO placeholder
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200054@lists.php.net to get a copy of this message
From: miki at epoch dot co dot il Operating system: NA PHP version: Irrelevant Package: PDO PgSQL Bug Type: Bug Bug description:PostgreSQL has questin mark operator. This collide with PDO placeholder Description: ------------ When I prepare the following query: SELECT * FROM post WHERE locations ? :location; The following warning occur: Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters in /path/file.php on line xx The question mark is an valid PostgreSQL operator but PDO condsider it as a placeholder. - http://www.postgresql.org/docs/9.5/static/functions-json.html I thought of several solutions: 1. Allow to disable question mark as placeholder. Leaving you with named placeholders. 2. Allow to change the placeholder char from a default value (?). 3. Teach pg driver to distinguish when it is a placeholder or an operator. I think I favor point 2. I also discussed it here: http://stackoverflow.com/questions/36173440/how-to-ignore-question-mark-as-placeholder-when-using-pdo-with-postgresql -- Edit bug report at https://bugs.php.net/bug.php?id=71885&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71885&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71885&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71885&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71885&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71885&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71885&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71885&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71885&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71885&r=support Expected behavior: https://bugs.php.net/fix.php?id=71885&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71885&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71885&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71885&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71885&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71885&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71885&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71885&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71885&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71885&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71885&r=mysqlcfg

« previous php.bugs (#200054) next »