Re: easy way to insert same value into 2 columns

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: easy way to insert same value into 2 columns
Дата
Msg-id 20031016172050.GD28009@wolff.to
обсуждение исходный текст
Ответ на Re: easy way to insert same value into 2 columns  (Sebastian Boeck <sebastianboeck@freenet.de>)
Список pgsql-general
On Thu, Oct 16, 2003 at 13:53:27 +0200,
  Sebastian Boeck <sebastianboeck@freenet.de> wrote:
> Csaba Nagy wrote:
> >I can't 100% say it's safe to use, but no, other inserts will not
> >influence the value, because currval will return the last sequence value
> >used by the current session (i.e. the current connection). And of course
> >you only have concurrent inserts using different connection, right ?
> >
> >HTH,
> >Csaba.
>
> Yes, that' right.
>
> Thanks

As mentioned earlier, the problem is with concurrent inserts, but rather
with which default expression gets calculated first. Today you are likely
to get predictable behavior out of this, but if you do an alter table
or perhaps upgrade to a new version of postgres, your code may break.

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

Предыдущее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: VACUUM degrades performance significantly. Database
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: ShmemAlloc errors