Re: Cannot insert a duplicate key into unique index

From: daq <daq(at)ugyvitelszolgaltato(dot)hu>
To: kynn(at)panix(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Cannot insert a duplicate key into unique index
Date: 2004-02-19 14:12:09
Message-ID: 89101658505.20040219151209@ugyvitelszolgaltato.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


kpc> Thank you all for the help. I'm almost there.

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.)

kpc> For that matter (going beyond my original question) does PostgreSQL
kpc> have anything like a comprehensive "catalog" function that will list
kpc> all the tables, their fields, etc. defined in the database?

You can list all the sequences:

select relname from pg_class where relkind='S';

and list all their atributes:

select * from sequence_name;

See "System Catalogs" in the documentation!

DAQ

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Terry Lee Tucker 2004-02-19 14:33:02 Re: Cannot insert a duplicate key into unique index
Previous Message kynn 2004-02-19 12:03:25 Re: Cannot insert a duplicate key into unique index