Re: Design question regarding arrays
От | Oliver Fromme |
---|---|
Тема | Re: Design question regarding arrays |
Дата | |
Msg-id | 200408091029.i79ATRv3053414@lurza.secnetix.de обсуждение исходный текст |
Ответ на | Re: Design question regarding arrays ("Sean Davis" <sdavis2@mail.nih.gov>) |
Ответы |
Re: Design question regarding arrays
|
Список | pgsql-novice |
Sean Davis wrote: > I'm a novice, too, but why not look up the value in the sequence and > increment it before doing any inserting? If you are doing all the inserts > at the same time (more or less), then you can just use this value in the > insert into both tables. Put all of this inside one transaction. That won't work if another process is trying to do the same thing at the same time. They both get the same value when they look it up, so there will be an ID collision. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Being really good at C++ is like being really good at using rocks to sharpen sticks." -- Thant Tessman
В списке pgsql-novice по дате отправления: