Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id B2FB44758A5 for ; Fri, 3 May 2002 15:09:06 -0400 (EDT) Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (Postfix) with ESMTP id 1C69A475876 for ; Fri, 3 May 2002 15:09:01 -0400 (EDT) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id OAA31130; Fri, 3 May 2002 14:08:55 -0500 X-Authentication-Warning: shire.ontko.com: Host bilbo.ontko.com [199.164.165.101] claimed to be nick Reply-To: From: "Nick Fankhauser" To: "MG" , "PostgreSQL List" Subject: Re: ALTER TABLE for field modify... Date: Fri, 3 May 2002 14:07:32 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: Importance: Normal X-Archive-Number: 200205/17 X-Sequence-Number: 4192 alter table drop constraint ID unique; alter table drop constraint ID not null; alter table add constraint ID references table2 ; Here is where you can find the documentation for this: The "alter": http://www.postgresql.org/idocs/index.php?sql-altertable.html The constraints: http://www.postgresql.org/idocs/index.php?sql-createtable.html regards, -Nick -------------------------------------------------------------------------- Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/ > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of MG > Sent: Thursday, May 02, 2002 3:28 PM > To: PostgreSQL List > Subject: [ADMIN] ALTER TABLE for field modify... > > > > Hi! > > How can I modify a field of table with ALTER TABLE? I want to modify the > constraint. The TABLE is now: > "ID" int8 NOT NULL, UNIQUE > > But I want this: > "ID" int8 REFERENCE "table2" > > > THanx! > Bye! > ----------------- > Linux RedHat 7.1 > ----------------- > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >