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

Re: Cannot insert a duplicate key into unique index

From: joseph speigle <joe(dot)speigle(at)jklh(dot)us>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Cannot insert a duplicate key into unique index
Date: 2004-02-19 15:10:21
Message-ID: 20040219151021.GA689@www.sirfsup.com (view raw or flat)
Thread:
Lists: pgsql-novice
> 
> kpc> How can I list all the sequences in the database, with their
> kpc> attributes (such as last_value)?  (I'm having a hard time guessing
> kpc> 'seq-name'; the 'A_id_seq' formula did not work.)
> 
> You can list all the sequences:
> 
> select relname from pg_class where relkind='S';
> 
> and list all their atributes:
> 
> select * from sequence_name;
> 

select last_value from something_seq

And I got the sequence name from \ds at the psql prompt! but that's only for the current database. 

joe 
-- 
speigle
www.sirfsup.com

In response to

pgsql-novice by date

Next:From: Philippe LangDate: 2004-02-19 16:02:10
Subject: crosstabs
Previous:From: kynnDate: 2004-02-19 14:43:17
Subject: Re: Cannot insert a duplicate key into unique index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group