Re: Easy form of "insert if it isn't already there"?

Поиск
Список
Период
Сортировка
От Berend Tober
Тема Re: Easy form of "insert if it isn't already there"?
Дата
Msg-id 4F3B609C.4050103@computer.org
обсуждение исходный текст
Ответ на Re: Easy form of "insert if it isn't already there"?  (Chris Angelico <rosuav@gmail.com>)
Ответы Re: Easy form of "insert if it isn't already there"?  (Bartosz Dmytrak <bdmytrak@eranet.pl>)
Список pgsql-general
Chris Angelico wrote:
> On Wed, Feb 15, 2012 at 5:26 PM, Bartosz Dmytrak<bdmytrak@eranet.pl>  wrote:
>>
>> e.g. You can use BEGIN... EXCEPTION.... END, good example of
>> such approach is
>> there: http://www.postgresql.org/docs/9.1/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE;
>

I wonder why, in that example, you would not try the INSERT
first, and if that fails, then do the update?



В списке pgsql-general по дате отправления:

Предыдущее
От: khizer
Дата:
Сообщение: postgresql-9.0
Следующее
От: Robert James
Дата:
Сообщение: Re: Memory tuning Postgres