Re: getting a sequence value

Поиск
Список
Период
Сортировка
От Guillaume Cottenceau
Тема Re: getting a sequence value
Дата
Msg-id 87y8chtb35.fsf@meuh.mnc.ch
обсуждение исходный текст
Ответ на Re: getting a sequence value  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: getting a sequence value  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Dave Cramer <pg 'at' fastcrypt.com> writes:

> Guillaume,
>
> No it can't be wrong from the database's point of view, now what
> happens in java is another problem

Yes, of course :)

> Here's how it works, in principle anyway.
>
> The last value of each sequence which has been generated using nextval
> is stored in the connections session memory.
> so when you use the SAME connection to retrieve currval it will
> retrieve that value.

We agree. And what the original poster wanted to do with his data
will be incorrect.

--
Guillaume Cottenceau

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: getting a sequence value
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: getting a sequence value