Re: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL
| От | Bruce Momjian |
|---|---|
| Тема | Re: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL |
| Дата | |
| Msg-id | 200001061611.LAA13385@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL
|
| Список | pgsql-hackers |
> However, if you need to know what value is being given to the
> inserted tuple, much the cleanest solution is to select nextval
> before inserting:
>
> SELECT nextval('sequenceobject');
> INSERT INTO table VALUES(... , value-you-just-got, ...);
>
> If you are always going to do that, then a trigger is a waste of cycles.
He can do:
INSERT INTO table VALUES(... , nextval('sequenceobject'), ...);
and currval() will get him the previous nextval() value.
-- 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,
Pennsylvania19026
В списке pgsql-hackers по дате отправления: