Re: Proposal: RETURNING primary_key() - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Proposal: RETURNING primary_key()
Date
Msg-id CAMsr+YFLdR6epW_J9x0sNaHEO4vSNuFz7skUKEzWR6BGnrcYDQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: RETURNING primary_key()  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 9 March 2016 at 21:30, Robert Haas <robertmhaas@gmail.com> wrote:
On Tue, Mar 8, 2016 at 8:12 PM, Craig Ringer <craig@2ndquadrant.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

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: WAL log only necessary part of 2PC GID
Next
From: Tom Lane
Date:
Subject: Re: WIP: Upper planner pathification