Re: problem fetching currval of sequence

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: problem fetching currval of sequence
Дата
Msg-id 200208061426.58011.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: problem fetching currval of sequence  (Charles Hauser <chauser@duke.edu>)
Список pgsql-sql
Charles,

> I know this script worked in the past, but I have not used it
> recently.  We are running PostgreSQL 7.1.3.  It would be great if
> this would work as I have several scripts which operate in a similar
> manner for different TABLES, but if it won't work I'll work around it.
>
> Suggestions for the best way to get the value for the gb_id after an INSERT?

I usually SELECT NEXTVAL(), and then pass that ID number to the INSERT
statement.   It's very reliable.

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________                                       Josh Berkus  Complete
informationtechnology     josh@agliodbs.com   and data management solutions     (415) 565-7293  for law firms, small
businesses     fax 621-2533   and non-profit organizations.     San Francisco 



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

Предыдущее
От: Charles Hauser
Дата:
Сообщение: Re: problem fetching currval of sequence
Следующее
От: "Tom Haddon"
Дата:
Сообщение: ALTER TABLE follow up