Re: currval of sequence xxx_seq is not yet defined in this session?
От | kenyon |
---|---|
Тема | Re: currval of sequence xxx_seq is not yet defined in this session? |
Дата | |
Msg-id | 1357696680573-5739294.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: currval of sequence xxx_seq is not yet defined in this session? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: currval of sequence xxx_seq is not yet defined in this
session?
|
Список | pgsql-general |
Thanks for your reply! yeath,I quite accept your opinion,once i guess the drive adds savepoint between the two SQL,but not sure i want to get the last insert id to ensure the INSERT correctly ,so i called currval(). as the error occurs seldom,i find it's difficult to trace the problem or the logic is doing exactly later i modified the code looks like: >select nexval('t_wedding_wedding_id_seq') as Wedding_id; >insert into t_wedding(wedding_id...) select Wedding_id...; and in the later pressure tesing never saw the error again. ----- God believes postgres is Good -- View this message in context: http://postgresql.1045698.n5.nabble.com/currval-of-sequence-xxx-seq-is-not-yet-defined-in-this-session-tp5738893p5739294.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: