Re: Replace into... - Mailing list pgsql-novice

From Boget, Chris
Subject Re: Replace into...
Date
Msg-id 4040BBE81A9AD411BD27009027887A7C0431DB@tiger.wild.net
Whole thread Raw
In response to Replace into...  ("Boget, Chris" <chris@wild.net>)
Responses Re: Replace into...  (Dani Oderbolz <oderbolz@ecologic.de>)
List 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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PERFORM] Extreme high load averages
Next
From: Richard Huxton
Date:
Subject: Re: [PERFORM] Extreme high load averages