Re: Cannot insert a duplicate key into unique index - Mailing list pgsql-novice

From
Subject Re: Cannot insert a duplicate key into unique index
Date
Msg-id 200402191443.i1JEhHt18578@panix3.panix.com
Whole thread Raw
In response to Re: Cannot insert a duplicate key into unique index  (daq <daq@ugyvitelszolgaltato.hu>)
List pgsql-novice
   X-Original-To: kynn@panix.com
   Date: Thu, 19 Feb 2004 15:12:09 +0100
   From: daq <daq@ugyvitelszolgaltato.hu>

   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!



Way cool.  Thanks.

BTW, I was wrong when I said that the 'A_id_seq' formula did not work
(it turns out that it failed due to a typo of mine).

kj



pgsql-novice by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Re: Cannot insert a duplicate key into unique index
Next
From: joseph speigle
Date:
Subject: Re: Cannot insert a duplicate key into unique index