| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера