Received: from Donald.bks ([203.145.133.13]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g19AWAE71908 for ; Sat, 9 Feb 2002 05:32:12 -0500 (EST) (envelope-from bhuvansql@yahoo.com) Received: from Larry.bks (root@Larry.bks [200.2.1.10]) by Donald.bks (8.11.6/8.11.2) with ESMTP id g19AX7r06956 for ; Sat, 9 Feb 2002 16:03:53 +0530 Received: from localhost (bhuvan@localhost) by Larry.bks (8.9.3/8.8.5) with ESMTP id PAA08420 for ; Sat, 9 Feb 2002 15:58:38 +0530 X-Authentication-Warning: Larry.bks: bhuvan owned process doing -bs Date: Sat, 9 Feb 2002 15:58:38 +0530 (IST) From: Bhuvan A X-Sender: bhuvan@Larry.bks To: pgsql-sql@postgresql.org Subject: Adding a New Composite Constraint to an Existing Table. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200202/96 X-Sequence-Number: 6524 Hi, I am using postgresql 7.1. I was unable to add a new PRIMARY KEY constraint to an existing table. i have table, CREATE TABLE xx ( id int, name text, amount int ); I have say some 10 records in this table, which are unique and not null (primary). Fine! Now, i am willing to have primary key constraint to all the 3 fields. I tried, bhuvan=> ALTER TABLE xx ADD primary key (id, name, amount); ERROR: ALTER TABLE / ADD CONSTRAINT is not implemented for that constraint type. Where i am wrong? How else, can i get that primary key constraint WITHOUT RECREATING that table? Hope to get some lights. Regards, Bhuvaneswar.