Re: nextval, sequences and sequencenames - Mailing list pgsql-general

From Gordan Bobic
Subject Re: nextval, sequences and sequencenames
Date
Msg-id Pine.LNX.4.33.0108150913120.13628-100000@sentinel.bobich.net
Whole thread Raw
In response to nextval, sequences and sequencenames  (Wieger Uffink <wieger@usmedia.nl>)
List pgsql-general
On Tue, 14 Aug 2001, Wieger Uffink wrote:

> My question:
> is there anyway of retreiving the sequence_name corresponding to the
> respective column,
> knowing just the tablename and columnname?
>
> The reason I need to do this, is because the application I write
> dynamicly creates new tables, and I have no way of knowing the sequence
> name before hand.
>

Try "tablename_fieldname_seq". That is the default sequence name for a
"serial" field.

Cheers.

Gordan


pgsql-general by date:

Previous
From: Walter
Date:
Subject: Newbie: Solution?
Next
From: Einar Karttunen
Date:
Subject: Re: libpq ::PQstatus()