Re: INSERT ... ON CONFLICT UPDATE and RLS

From: David Fetter <david(at)fetter(dot)org>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT UPDATE and RLS
Date: 2015-01-08 01:33:43
Message-ID: 20150108013343.GA14183@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 07, 2015 at 05:18:58PM -0800, Peter Geoghegan wrote:
> On Wed, Jan 7, 2015 at 5:16 PM, David Fetter <david(at)fetter(dot)org> wrote:
> > There's precedent. Unique constraints, for example.
>
> I don't see that as any kind of precedent.

In the part you sliced off, Stephen described a situation where the
contents of a database either do or don't cause a query to violate a
constraint. Uniqueness constraints are one example of this.

CREATE TABLE foo(id INTEGER PRIMARY KEY);

INSERT INTO foo(id) VALUES(1); /* Works the first time */
INSERT INTO foo(id) VALUES(1); /* Fails the next time */

Same database, same constraints, different outcome.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ali Akbar 2015-01-08 01:51:31 Re: [REVIEW] Re: Fix xpath() to return namespace definitions
Previous Message Peter Geoghegan 2015-01-08 01:18:58 Re: INSERT ... ON CONFLICT UPDATE and RLS