Re: [GENERAL] How to get seq after insert]

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [GENERAL] How to get seq after insert]
Дата
Msg-id 199904150407.AAA27406@candle.pha.pa.us
обсуждение исходный текст
Ответ на RE: [GENERAL] How to get seq after insert  (Brian <signal@shreve.net>)
Ответы Re: [GENERAL] How to get seq after insert]  (Karl DeBisschop <kdebisschop@spaceheater.infoplease.com>)
Список pgsql-general
> On Wed, 14 Apr 1999, Michael Davis wrote:
>
> > The safest way is to select the nextval('seq_name') and then insert using
> > this value.
>
> I understand, I just thought something like, I do the insert, and then
> grab the value with:
>
>  $insertid = $sth->{'insertid'};

The OID is returned from the insert.  Use that, or use it to look up the
field you want.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Brian
Дата:
Сообщение: RE: [GENERAL] How to get seq after insert
Следующее
От: Guo Ge
Дата:
Сообщение: (no subject)