Getting sequence value after inserting many rows at a time

Поиск
Список
Период
Сортировка
От Maurício Sessue Otta
Тема Getting sequence value after inserting many rows at a time
Дата
Msg-id 010901c2b841$f429f290$830101c0@mauricio1
обсуждение исходный текст
Ответы Re: Getting sequence value after inserting many rows at a time
Re: Getting sequence value after inserting many rows at a time
Список pgsql-sql
Hi,
 
I have a PHP script that do something like this:
 
INSERT INTO table_with_sequence (field1, field2...., fieldn)
SELECT field1, field2, ..., fieldn FROM table,table
WHERE condition, condition
 
My doubt:
Will the rows just inserted in "table_with_sequence" always be sequencial?
(won't it happen to have X rows from this INSERT, 1 rows from another INSERT
in the middle and the rest rows of the first INSERT?)
 
How can I safely get the first value the INSERT "generated" for
the sequence?
 
[]'s Mauricio

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: [NOVICE] Search and Replace
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Getting sequence value after inserting many rows at a time