View Single Post

   
  #3 (permalink)  
Old 04-10-2008, 08:18 AM
johnf
 
Posts: n/a
Default Re: find the sequence name from schema, table, field

On Thursday 10 January 2008 06:12:43 am Alvaro Herrera wrote:
> pg_get_serial_sequence


But it only works with a serial data type.

Create a sequence "mySequence"
Create a field "myField smallint NOT NULL DEFAULT
nextval('mysequence'::regclass)"

So given the name of the table and the name of the field. How can I find the
name of the associated squence?



--
John Fabiani

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote