On Fri, Aug 15, 2003 at 12:32:36PM +0300, cristi wrote: > What is wrong here? > > insert into table_name (field_name) values (select > setval('sequence_name')-1) as currval);
This should be better: INSERT INTO table_name (field_name) VALUES (nextval('sequence_name')); -- %!PS 297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100 180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180 0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont 240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly