Re: transaction safety

Поиск
Список
Период
Сортировка
От DaVinci
Тема Re: transaction safety
Дата
Msg-id 20010212123414.A685@fangorn.net
обсуждение исходный текст
Ответ на Re: transaction safety  ("Oliver Elphick" <olly@lfix.co.uk>)
Список pgsql-general
On Mon, Feb 12, 2001 at 11:08:55AM +0000, Oliver Elphick wrote:
> DaVinci wrote:
>   > Hi all.
>   >
>   > I want to create a new tuple of main info and detail tuples (in
>   > different tables) that are joined by a key field. Key field is created by
>   > generator automatically and I need that number in order to assign to detail
>   > tuples. How can I to get that number in a safe way?.
>
> A successful INSERT returns the oid of the row just created; so get the
> new value with a query like this:
>
>   SELECT key_field FROM table WHERE oid = new_oid_value;

 I have a new question for this idea (thanks). When Database is big, do i
 need index for oid field to speed select?.

 Greets.

                                                             David

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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: transaction safety
Следующее
От: Michael Ansley
Дата:
Сообщение: RE: transaction safety