Re: [GENERAL] The value returned by autoinc ?

Поиск
Список
Период
Сортировка
От Silvio Emanuel Barbosa de Macedo
Тема Re: [GENERAL] The value returned by autoinc ?
Дата
Msg-id Pine.GSO.3.96.990315095347.20927D-100000@newton.inescn.pt
обсуждение исходный текст
Ответ на Re: [GENERAL] The value returned by autoinc ?  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Ответы Re: [GENERAL] The value returned by autoinc ?
Список pgsql-general
    Thank you for your answer.
    Still, one doubt.

On Mon, 15 Mar 1999, Herouth Maoz wrote:
>   INSERT...
>   SELECT currval( 'seq_name' );
>...
> It will also give you the
>correct number even if between the INSERT and the SELECT, another process
>or another connection also made an insert.
>Herouth

If there is an insert between my INSERT and SELECT, won't the counter be
increased ? The only way I can understand this is the transaction locks
inserts... so, in fact there could not exist another insert...

Am I wrong (or better, how wrong am I :) ) ?

Thanks again!


,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
`````````````````````````````````````````````
Silvio Emanuel Nunes Barbosa de Macedo
mailto:smacedo@inescn.pt

INESC - Porto - Grupo CAV
Pc da Republica, 93 R/C   Tel:351 2 209 42 21
4000 PORTO  PORTUGAL      Fax:351 2 208 41 72








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

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: [GENERAL] The value returned by autoinc ?
Следующее
От: Clark Evans
Дата:
Сообщение: Re: [GENERAL] The value returned by autoinc ?