Search Postgresql Archives

Serials jumping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a serial column on a test box DB. I'm
using "select nextval('some_seq') as id" to insert a
id in sequence. It doesn't return the next value but
at least 4 or so (random) ahead of the current
value. Is this to be expected? 

Is this the most efficient way to retreive an id value
for insert a row then insert the resulting row into
the related tables? 

Is there a more efficient/proper way? I would like all
my records to increment by 1 if possible. I'd be very
grateful to read your opinion.

Thank you.


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux