Re: Replace into...

From: "Boget, Chris" <chris(at)wild(dot)net>
To: "'Nabil Sayegh '" <postgresql(at)e-trolley(dot)de>, "'brew(at)theMode(dot)com '" <brew(at)theMode(dot)com>
Cc: "''PGSQL-NOVICE(at)postgresql(dot)org' '" <PGSQL-NOVICE(at)postgresql(dot)org>
Subject: Re: Replace into...
Date: 2003-07-06 15:46:57
Message-ID: 4040BBE81A9AD411BD27009027887A7C0431DB@tiger.wild.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

>> Somebody else probably has a more clever way to do it though......
>I would do this unconditionally.
>UPDATE ... FROM ... WHERE EXISTS (SELECT ...)
>INSERT INTO ... WHERE NOT EXISTS (SELECT ...)
>That are still 2 queries, but better than playing around with triggers.

I need to do this in a trigger, though. The trigger I need to create
is one that will run when I try to update a view. I'm going to need to
update a different table, instead.

thnx,
Chris

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Martin Foster 2003-07-06 20:16:37 Re: Extreme high load averages
Previous Message Tom Lane 2003-07-06 15:19:25 Re: [PERFORM] Extreme high load averages