Re: Access - ODBC - serial problem...

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Access - ODBC - serial problem...
Дата
Msg-id 200404081857.38799.dev@archonet.com
обсуждение исходный текст
Ответ на Re: Access - ODBC - serial problem...  (Shachar Shemesh <psql@shemesh.biz>)
Список pgsql-odbc
On Thursday 08 April 2004 17:44, Shachar Shemesh wrote:
> Philippe Lang wrote:
> >
> >Is there a solution to that, except inserting records with PL-PGSQL, which
> > I already do in some cases, by the way...?
>
> I would love it if one of the resident Postgres gurus could verify this,
> but I think running "select currval('test_id_seq')" ought to do exactly
> what you want in this case. It should tell you the most recent id
> assigned by the sequence in your session.
>
> Can someone please verify that this command does not suffer races?

currval() and nextval() are guaranteed safe. What this does mean is that you
can end up with gaps in your sequence though.

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: Ray Aspeitia
Дата:
Сообщение: Re: Access - ODBC - serial problem...
Следующее
От: "Philippe Lang"
Дата:
Сообщение: Re: Access - ODBC - serial problem...