Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} - Mailing list pgsql-hackers

From Robert Haas
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date
Msg-id CA+TgmoaWgywttY9TtUyXuonLVYxi18eTTcUfpDRXPiodvtA=ZA@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On Thu, Dec 4, 2014 at 1:27 PM, Peter Geoghegan <pg@heroku.com> wrote:
> On Thu, Dec 4, 2014 at 3:04 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
>> Yes, I think that's pretty important. With a negative attno so it's
>> treated as a "hidden" col that must be explicitly named to be shown and
>> won't be confused with user columns.
>
> I think that the standard for adding a new system attribute ought to
> be enormous. The only case where a new one was added post-Postgres95
> was "tableoid". I'm pretty sure that others aren't going to want to do
> it that way.

+1.  System attributes are a mess; a negative attribute number implies
not only that the column is by default hidden from view but also that
it is stored in the tuple header rather than the tuple data.  Using
one here, where we're not even talking about a property of the tuple
per se, would be a pretty goofy solution.

> Besides, I'm not entirely convinced that this is actually
> an important distinction to expose.

I think it's probably an important distinction, for the kinds of
reasons Anssi mentions, but we should look for some method other than
a system column of indicating it.  Maybe there's a magic function that
returns a Boolean which you can call, or maybe some special clause, as
with WITH ORDINALITY.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf
Next
From: Michael Paquier
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf