Re: shorter way to get new value of serial?

Поиск
Список
Период
Сортировка
От Harald Armin Massa
Тема Re: shorter way to get new value of serial?
Дата
Msg-id 7be3f35d0511210213h7e147acav@mail.gmail.com
обсуждение исходный текст
Ответ на Re: shorter way to get new value of serial?  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
Alban Hertroys,

Why don't you just use the default? You could entirely do away with the
'result' variable that way:

because I need to know which is the new id of that computer. The other way would be "insert if not exists" and again "select where name = ..." -> 1 statement more, and without a stored procedure even a roundtrip client - server - client more, which is expensive in WAN situations :(

Harald


--
GHUM Harald Massa
persuasion python postgresql
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: shorter way to get new value of serial?
Следующее
От: Hannes Dorbath
Дата:
Сообщение: TSearch2 Questions