Update on Insert - Mailing list pgsql-hackers

From SebiF
Subject Update on Insert
Date
Msg-id 48624cbf-bdee-43f8-bc56-bd670c19570d@j4g2000yqe.googlegroups.com
Whole thread Raw
Responses Re: Update on Insert  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi Everyone,

Given a table "Items" with a PK "item1" and "Qty" - a numeric column
I'd like to define a way in Postgres to insert when item11 doesn't
exist already in "Items" and update the Qty by adding the new quantity
to the existent when the item11 exists. What is a good approach and
where should I be looking for details. Thanks.

Sebastian


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TABLE...ALTER COLUMN vs inheritance
Next
From: Sergey Konoplev
Date:
Subject: Re: Unpredictable shark slowdown after migrating to 8.4