Re: manually setting the command tag (was Re: 8.4: suppress_redundant_updates trigger vs. "Upsert" logic)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Mark Reid <mark(at)markreid(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: manually setting the command tag (was Re: 8.4: suppress_redundant_updates trigger vs. "Upsert" logic)
Date: 2009-09-07 23:25:20
Message-ID: 20090907232520.GR8894@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Tom Lane escribió:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Pavel Stehule escribi:
> >> Isn't better to solve the the correct diagnostics for INSTEAD rules or triggers?
>
> > As far as I can tell it's not possible to do better without letting the
> > user put their hands on the tag.
>
> And how is the user going to do better? For example, what if there are
> two triggers trying to set the result, perhaps because two different
> commands have been generated by DO ALSO rules?

We would allow the user to set a policy. This provides the mechanism
for doing it. Right now there is no mechanism at all and we fail to do
anything.

> I don't think that "put it on the user's shoulders" is a good solution.

Is there a better idea?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Pavel Stehule 2009-09-08 03:55:45 Re: manually setting the command tag (was Re: 8.4: suppress_redundant_updates trigger vs. "Upsert" logic)
Previous Message Tom Lane 2009-09-07 23:10:05 Re: manually setting the command tag (was Re: 8.4: suppress_redundant_updates trigger vs. "Upsert" logic)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-07 23:47:49 Re: LATERAL
Previous Message David E. Wheeler 2009-09-07 23:13:35 Snow Leopard Features