Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94334 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68674 invoked from network); 30 Jun 2016 13:04:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2016 13:04:08 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:46074] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/D2-14264-6C815775 for ; Thu, 30 Jun 2016 09:04:07 -0400 Received: (qmail 19419 invoked from network); 30 Jun 2016 13:04:02 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 30 Jun 2016 13:04:02 -0000 To: PHP Internals References: Cc: Davey Shafik , Joe Watkins Message-ID: <6fc6c20c-6a5c-da25-e2a0-d638f4eb2ee8@beccati.com> Date: Thu, 30 Jun 2016 15:03:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: PDO_pgsql and "?" json operator (was [PHP-DEV] About PHP 7.1.0 Feature Freeze) From: php@beccati.com (Matteo Beccati) Hi Davey, I'm patching in internals again, as I should probably have done in the first place ;) On 30/06/2016 13:04, Davey Shafik wrote: >> On Thu, Jun 30, 2016 at 3:56 AM, Matteo Beccati > > wrote: >> >> Hi Davey, Joe, >> >> I'm sending this email to check with you if you think it's appropriate >> for me to go ahead and merge the following to master: >> >> https://github.com/php/php-src/pull/1967 >> >> It's basically something in between a feature and a bug fix for: >> >> https://bugs.php.net/71885 >> >> i.e. allowing pdo_pgsql users to escape question mark placeholders in >> order to use the json "?" operator (and others, also containing a "?"). > > > I think that given there are potentially other possibilities for solving > this issue, I'd like to see an RFC. > > Personally, I'd prefer to see PDO have feature flags to support the $# > syntax that is used natively, and ignore all question marks. Or perhaps > allow switching to '$?' (which should be possible to distinguish from > the operator). Or allow turning off anonymous placeholders, and only use > named placeholders. > > I wouldn't want to get any further away from _actual_ pgsql syntax than > we have to, and I think this current patch does that. > > Thoughts? Supporting Postgres' own placeholders would mean moving away from PDO's own syntax and it would seem quite odd to me. Not to mention something painful to support in the various database libraries. On the other hand a system to enable/disable placeholder types seems fairly easy to implement and possibly cleaner, but it would be rather awkward to use and very cumbersome, if feasible at all, for those not using PDO directly. That said, I'll be happy to put forward an RFC if necessary, but that would be probably a few months from now and targeting 7.2. While I'm at it... would would be the proper workflow for asking to become maintainer for pdo_pgsql? Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/