Re: insert without oids

От: Michael Stone
Тема: Re: insert without oids
Дата: ,
(см: обсуждение, исходный текст)
Ответ на: Re: insert without oids  (Neil Conway)
Список: pgsql-performance

Скрыть дерево обсуждения

insert without oids  (Michael Stone, )
 Re: insert without oids  (Michael Fuhr, )
 Re: insert without oids  (Neil Conway, )
  Re: insert without oids  (Michael Stone, )

On Fri, Jan 13, 2006 at 04:29:15PM -0500, Neil Conway wrote:
>There's really no additional operations required:
>INSERT INTO t2 VALUES (currval('t1_id_seq'), ...);
>You need a separate SELECT if you want to use the generated sequence
>value outside the database,

That would, of course, be the goal. IOW, if you have a table which has
data which is unique only for the serial column, the old syntax provided
a way to refer to the newly inserted row uniquely without any additional

>although the INSERT ... RETURNING extension will avoid that

That sounds promising. I'll have to put the TODO list on my todo list.

Mike Stone

В списке pgsql-performance по дате сообщения:

От: Bruce Momjian
Сообщение: Re: Extremely irregular query performance
Сообщение: Hanging Query