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

From: johnf <jfabiani(at)yolo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: find the sequence name from schema, table, field
Date: 2008-01-10 15:12:39
Message-ID: 200801100712.39496.jfabiani@yolo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2008-01-10 15:19:58 Re: Postgres replication
Previous Message Kevin Kempter 2008-01-10 15:10:39 Re: Postgres replication