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

2009-09-08 Thread decibel
On Sep 7, 2009, at 6:10 PM, Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.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

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

2009-09-07 Thread Alvaro Herrera
Mark Reid wrote: It'll similarly break any code where a result of UPDATE 0 is assumed to indicate that the record does not exist. I wonder if this could be helped if the trigger had a way of overriding the emitted command tag. There are countless reports of trouble because somebody has an

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

2009-09-07 Thread Pavel Stehule
2009/9/7 Alvaro Herrera alvhe...@commandprompt.com: Mark Reid wrote: It'll similarly break any code where a result of UPDATE 0 is assumed to indicate that the record does not exist. I wonder if this could be helped if the trigger had a way of overriding the emitted command tag. There are

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

2009-09-07 Thread Alvaro Herrera
Pavel Stehule escribió: 2009/9/7 Alvaro Herrera alvhe...@commandprompt.com: There are countless reports of trouble because somebody has an INSTEAD rule in the table, and the tag emits something that's not quite acceptable for some outer software layer.  The problem is that there's no way

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

2009-09-07 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.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.

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

2009-09-07 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.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

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

2009-09-07 Thread Pavel Stehule
2009/9/8 Alvaro Herrera alvhe...@commandprompt.com: Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.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