Re: Proposal: RETURNING primary_key()

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Igal (at) Lucee(dot)org" <igal(at)lucee(dot)org>, Ian Barwick <ian(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: RETURNING primary_key()
Date: 2016-03-09 14:27:04
Message-ID: CAMsr+YFLdR6epW_J9x0sNaHEO4vSNuFz7skUKEzWR6BGnrcYDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9 March 2016 at 21:30, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Tue, Mar 8, 2016 at 8:12 PM, Craig Ringer <craig(at)2ndquadrant(dot)com>
> wrote:
> > There certainly are server/protocol frustrations.
>
> I'm sympathetic to all of these and think we should work on fixing
> them, particularly...
>
> > STRING TYPE ISSUES
> > ---
> >
> > PgJDBC can work around Pg's IMO somewhat overzealous type checks ...
>
> This.

I've raised that multiple times and got nowhere. More importantly, I'm
reasonably convinced that passing string types as UNKNOWNOID is what users
generally want and expect anyway, and is consistent with what happens when
you write string literals directly in SQL. I think we should just change
PgJDBC to default to this already-optional behaviour, which is currently
controlled by the stringtype=unspecified JDBC parameter.

Other drivers have similar issues, and can fix it the same way. Maybe we
should document it somewhere, but I think this is in many ways the least
deserving of attention. Partly because clients can work around it easily,
partly because the energy input required for any change will be prohibitive
and is better spent elsewhere.

I'd *much* rather have things like query cancel cookies, per-query GUCs at
the protocol level, etc.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-03-09 14:47:56 Re: WIP: Upper planner pathification
Previous Message Petr Jelinek 2016-03-09 14:26:11 Re: WAL log only necessary part of 2PC GID