Hi Davey,
I'm patching in internals again, as I should probably have done in the
first place ;)
On Thu, Jun 30, 2016 at 3:56 AM, Matteo Beccati <php@beccati.com
mailto:php@beccati.com> 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/