View Single Post

   
  #1 (permalink)  
Old 04-17-2008, 09:42 PM
Walker, Jed S
 
Posts: n/a
Default Serial data type

I have several tables that require auto-generated Ids. I have noticed the
serial and bigserial data types (or pseudo-types). These seem like they make
things much simpler, but if you use this, how can you find out the the value
of the serial column after you insert a row? Do you have to lookup the
primary key or is it stored in a session variable or some other place? Is
it better to define the sequence manually and just select it out by hand
before doing the insert?

Thanks,


Jed S. Walker




Reply With Quote