Re: INSERT .... RETURNING - Mailing list pgsql-general

From Dennis Brakhane
Subject Re: INSERT .... RETURNING
Date
Msg-id 226a19190811071145w23807798vc6e0c8572a277731@mail.gmail.com
Whole thread Raw
In response to Re: INSERT .... RETURNING  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
List pgsql-general
On Thu, Nov 6, 2008 at 8:49 AM, Rafal Pietrak <rafal@zorro.isa-geek.com> wrote:
> One comment I'd like to make as total lamer on the subject, is that the
> assumption on SELECT (that it's not firing triggers), could potentially
> be resolved by a *global* or "database" configuration option - once
> selected, the SQL programmers' responsibility would be: not to assume
> that on SELECT at the application layer.

I think Tom meant that PostgreSQL's code assumes that select fires no triggers.
Hence, triggers (and probably constraints) wouldn't fire if you did a
select (insert ... returning).
So your setting would basically mean "make triggers fire some of the
time, and I don't
care about data consistency either". I doubt any sane person would
activate it ;)

pgsql-general by date:

Previous
From: Said Ramirez
Date:
Subject: Re: Specifying text to substitute for NULLs in selects
Next
From: Ivan Sergio Borgonovo
Date:
Subject: Re: Specifying text to substitute for NULLs in selects