Serial - last value

Поиск
Список
Период
Сортировка
От hendra kusuma
Тема Serial - last value
Дата
Msg-id 26dadb3d0811200100m5670a630td9364e4deeb5a85a@mail.gmail.com
обсуждение исходный текст
Ответы Re: Serial - last value  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Hi there
a little basic question here

I usually use something like this in stored function
to get the last value of a serial type column

select last_value into ret from id_sequence
return ret


What i'm asking is,
if many people run the same stored function at the same time
will they get the last_value they should really get
or is there another way to code that can ensure they really get the right value

Thank you
Regards
Hendra

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

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Prepared statement already exists
Следующее
От: "Jonatan Evald Buus"
Дата:
Сообщение: row-level security (Dynamically rewrite queries)