X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 822FA9DC93B for ; Wed, 4 Jan 2006 14:07:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65926-08 for ; Wed, 4 Jan 2006 14:07:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ausimss.pervasive.com (ausimss.pervasive.com [66.45.103.246]) by postgresql.org (Postfix) with ESMTP id 283D39DC97C for ; Wed, 4 Jan 2006 14:07:54 -0400 (AST) Received: from ausbayes2.aus.pervasive.com ([172.16.8.6]) by ausimss.pervasive.com with InterScan Messaging Security Suite; Wed, 04 Jan 2006 12:07:53 -0600 Received: from ausmailowa.aus.pervasive.com ([172.16.4.8]) by ausbayes2.aus.pervasive.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 4 Jan 2006 12:07:53 -0600 Received: from ausmail2k4.aus.pervasive.com ([172.16.4.17]) by ausmailowa.aus.pervasive.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 4 Jan 2006 12:07:55 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: CONSTRAINT syntax in ALTER TABLE Date: Wed, 4 Jan 2006 12:07:53 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [DOCS] CONSTRAINT syntax in ALTER TABLE Thread-Index: AcYQ5wzxtEuZ5X8tQpS5hgQNhsMB8QAcexfw From: "Jim Nasby" To: "Bruce Momjian" Cc: X-OriginalArrivalTime: 04 Jan 2006 18:07:55.0610 (UTC) FILETIME=[C97223A0:01C61159] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.016 required=5 tests=[AWL=0.016] X-Spam-Score: 0.016 X-Spam-Level: X-Archive-Number: 200601/15 X-Sequence-Number: 3405 > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > > is (I assume) it would do nothing to help \h ALTER TABLE in=20 > psql. Maybe > > a good compromise would be to include the table_constraint=20 > section of > > the CREATE TABLE syntax in the ALTER TABLE syntax. >=20 > If they created the table, they have already seen the=20 > constraint syntax. > I see no reason to repeat it. The reason I'd repeat it is because when you're going to modify existing constraints, you'll be using ALTER TABLE. Sure, if the user memorized the constraint syntax when they created the table, they won't need extra help. Personally, I usually make use of column-level constraints when writing DDL, so any time I need to use table-level syntax I often have to look something up. That's why I'd like to see the info in \h. If you look at our docs from a newbie standpoint, they're not very easy to use, because it's difficult to find stuff unless you know where to look. If you're looking in the SQL Syntax section, ALTER TABLE is the obvious choice if you need to change something about the table, but it's a PITA to have to refer to other documentation to find the full syntax for the command. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461