Update on Insert

Поиск
Список
Период
Сортировка
От SebiF
Тема Update on Insert
Дата
Msg-id 48624cbf-bdee-43f8-bc56-bd670c19570d@j4g2000yqe.googlegroups.com
обсуждение исходный текст
Ответы Re: Update on Insert
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLE...ALTER COLUMN vs inheritance
Следующее
От: Sergey Konoplev
Дата:
Сообщение: Re: Unpredictable shark slowdown after migrating to 8.4