On Sat, Sep 17, 2011 at 10:52 AM, Andreas wrote:
> Instead of the update the query fails with an double key value error for the
> primary key.
> Shouldn't the insert fail, get rolled back and then exercute an update
> instead successfully?
Yes, and that is indeed what I see when I run your exampl
am Mon, dem 18.08.2008, um 9:44:48 +0200 mailte Andreas Kraftl folgendes:
> But there is also the possibility, that one row is available. Means that
> i need an UPDATE instead of the INSERT.
>
> Is it in SQL possible to decide if there is an UPDATE or an INSERT or
> must i program something with
Oleg Mayevskiy <[EMAIL PROTECTED]> writes:
> it seems to be a simple problem, but it is not.
Yes it is ... you're expecting the RI triggers to fire during the
plpgsql function, but in fact they fire at completion of the outer
statement that called the plpgsql function.
There's been some debate ab