Re: 'UPDATE OR INSERT' command

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: 'UPDATE OR INSERT' command
Дата
Msg-id 20040715174932.GS21419@ns.snowman.net
обсуждение исходный текст
Ответ на 'UPDATE OR INSERT' command  (Jeff Kowalczyk <jtk@yahoo.com>)
Список pgsql-sql
* Jeff Kowalczyk (jtk@yahoo.com) wrote:
> Is there a postgresql SQL idiom to perform an UPDATE, which becomes an
> INSERT if the primary key does not exist?
>
> I'm not sure I *should* use it in my application, I just want to know if
> it can be done. Thanks.

Unfortunately, I don't believe there's one in PostgreSQL yet.  MERGE is
similar to this, and is defined in the latest SQL spec.  Hopefully it'll
be implemented in PostgreSQL sometime soon.
Stephen

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: 'UPDATE OR INSERT' command
Следующее
От: Luis Sousa
Дата:
Сообщение: Problem in age on a dates interval