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 166019DC9F0 for ; Wed, 4 Jan 2006 00:26:38 -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 21426-04 for ; Wed, 4 Jan 2006 00:26:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from candle.pha.pa.us (candle.pha.pa.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id B30D59DC9A0 for ; Wed, 4 Jan 2006 00:26:35 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id k044Qb614190; Tue, 3 Jan 2006 23:26:37 -0500 (EST) From: Bruce Momjian Message-Id: <200601040426.k044Qb614190@candle.pha.pa.us> Subject: Re: CONSTRAINT syntax in ALTER TABLE In-Reply-To: <20060104021229.GI82560@pervasive.com> To: "Jim C. Nasby" Date: Tue, 3 Jan 2006 23:26:37 -0500 (EST) CC: pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200601/9 X-Sequence-Number: 3399 Jim C. Nasby wrote: > On Mon, Jan 02, 2006 at 09:04:50PM -0500, Bruce Momjian wrote: > > Jim C. Nasby wrote: > > > Maybe it's just me, but I find it annoying that the ALTER TABLE docs > > > say to look at the CREATE TABLE docs for info on CONSTRAINT syntax. ISTM > > > it would be much better to: > > > > > > Include the docs in both places, or > > > Break constraint syntax/info into it's own page > > > > > > A last-resort would be to still refer to CREATE TABLE, but at least make > > > it link to the actual constraint section, instead of just linking to the > > > top of the page as it does now. > > > > I like that last idea. I don't think duplicate documentation or a > > separate section are a win. > > By #2 I assume you mean my 'last resort'. One thing I dislike about that Yes, sorry. > is (I assume) it would do nothing to help \h ALTER TABLE in psql. Maybe > a good compromise would be to include the table_constraint section of > the CREATE TABLE syntax in the ALTER TABLE syntax. If they created the table, they have already seen the constraint syntax. I see no reason to repeat it. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073