Re: Is there a solution for "SELECT OR INSERT"

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема Re: Is there a solution for "SELECT OR INSERT"
Дата
Msg-id 82aakq99s8.fsf@mid.bfk.de
обсуждение исходный текст
Ответ на Is there a solution for "SELECT OR INSERT"  ("Stefan Becker" <stefan@yukonho.de>)
Список pgsql-sql
* Stefan Becker:

> Is there a way to get the ID row OR create a new one in
> ONE single statement?

You could create a stored procedure.  But if you have concurrent
inserts, locking is a bit tricky.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


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

Предыдущее
От: Carla
Дата:
Сообщение: Re: subselect and left join not working?
Следующее
От: manidegr8
Дата:
Сообщение: Re: Deleting entries from multiple tables