Serial data type

Поиск
Список
Период
Сортировка
От Walker, Jed S
Тема Serial data type
Дата
Msg-id 41669DC6FE3B80449A33A4DD46DB370A09E7EA01@entcoexch15.broadband.att.com
обсуждение исходный текст
Ответы Re: [despammed] Serial data type  (Andreas Kretschmer <akretschmer@despammed.com>)
Re: Serial data type  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice

I have several tables that require auto-generated Ids. I have noticed the serial and bigserial data types (or pseudo-types). These seem like they make things much simpler, but if you use this, how can you find out the the value of the serial column after you insert a row? Do you have to lookup the primary key or is it stored in a session variable or some other place?  Is it better to define the sequence manually and just select it out by hand before doing the insert?

Thanks,

      Jed S. Walker

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: error handling
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Problems on "copy" statement