Re: Problems with question marks in operators (JDBC, ECPG, ...)

From: Bruno Harbulot <bruno(at)distributedmatter(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problems with question marks in operators (JDBC, ECPG, ...)
Date: 2015-05-19 19:15:17
Message-ID: CANPVNBYZtgqqLWsaHD5e-cSaF+wLXYLXDis663aPHf15Zip1rQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 19, 2015 at 7:51 PM, Greg Sabino Mullane <greg(at)turnstep(dot)com>
wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
> Dave Cramer opined:
> > It would seem that choosing ? for operators was ill advised; I'm not
> > convinced that deprecating them is a bad idea. If we start now, in 5
> years
> > they should be all but gone
>
> Ha ha ha ha ha! That's a good one. We still have clients on Postgres 7!
> Five years is way too short to replace something that major.
>

I think deprecation doesn't necessarily imply removal. It seems that the
two operators could exist together by creating a second operator with the
same characteristics as suggested by Frank Heikens in this post:
http://stackoverflow.com/questions/27573778/postgresql-jsonb-and-jdbc/27580137#27580137

This would also make it easier to backport these operators into existing
installations (even on 9.4), thereby making the transition easier.

I don't know enough about PostgreSQL's implementation, but I presume this
is effectively just giving an alias for the same operation, and hopefully,
the query engine could benefit from indices created using either notations
interchangeably. (This is probably the most important feature when changing
one notation for another.)

In addition, the argument regarding the time it can take users to upgrade
works both ways. If I understood correctly from your message yesterday,
you've only implemented the latest workaround using \? in DBD::Pg quite
recently, which would equally require users to be able to upgrade to a more
recent version of DBD::Pg (or PHP/PDO where the workaround doesn't seem to
be implemented at all yet). Admittedly, I guess it might often be easier to
upgrade the client side than the database server, but I'm not sure that is
always the case (some frontends can potentially be awkward to update,
whereas a database upgrade can be smoother... It varies...).

Best wishes,

Bruno.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2015-05-19 19:19:39 Re: Problems with question marks in operators (JDBC, ECPG, ...)
Previous Message Andrew Dunstan 2015-05-19 19:13:01 Re: Problems with question marks in operators (JDBC, ECPG, ...)