Re: FAQ error
| От | Bruce Momjian |
|---|---|
| Тема | Re: FAQ error |
| Дата | |
| Msg-id | 200110142327.f9ENRG122771@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: FAQ error (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-hackers |
> Obviously, someone did because they tried the code and it didn't work.
> At least the new code is closer to valid, though less clear. It is at
> least a valid snippet, which the previous version was not.
OK, I changed it to more pseudocode:
new_id = output of "SELECT nextval('person_id_seq')" INSERT INTO person (id, name) VALUES (new_id, 'Blaise
Pascal');
and
INSERT INTO person (name) VALUES ('Blaise Pascal'); new_id = output of "SELECT currval('person_id_seq')";
-- Bruce Momjian | http://candle.pha.pa.us pgman@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 по дате отправления: