Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group