Re: find the sequence name from schema, table, field

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

 



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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux