X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E76928B9F56 for ; Sat, 19 Feb 2005 04:08:37 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94539-10 for ; Sat, 19 Feb 2005 04:08:34 +0000 (GMT) Received: from mail1.elevating.com (wsip-68-99-77-237.tu.ok.cox.net [68.99.77.237]) by svr1.postgresql.org (Postfix) with ESMTP id 35ABB8B9F52 for ; Sat, 19 Feb 2005 04:08:33 +0000 (GMT) Received: from bretsony.brets.elevating.com (bretsony.brets.elevating.com [10.23.0.139]) by mail1.elevating.com (8.11.6/8.11.6) with ESMTP id j1J48CK05895; Fri, 18 Feb 2005 22:08:12 -0600 Subject: Re: what does ONLY do From: Bret Hughes To: Stephan Szabo Cc: postgresql sql list In-Reply-To: <20050218191259.I39081@megazone.bigpanda.com> References: <1108778394.9866.498.camel@bretsony> <20050218191259.I39081@megazone.bigpanda.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-9.7x.1) Date: 18 Feb 2005 22:08:12 -0600 Message-Id: <1108786092.13812.512.camel@bretsony> Mime-Version: 1.0 X-Elevating-MailScanner: Found to be clean X-Elevating-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.5, required 5, BAYES_00 -1.50) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/217 X-Sequence-Number: 20328 On Fri, 2005-02-18 at 21:15, Stephan Szabo wrote: > On Fri, 18 Feb 2005, Bret Hughes wrote: > > > I can't seem to find an explanation of what adding ONLY does for an sql > > statement for instance : > > > > ALTER TABLE [ONLY] ADD COLUMN ... > > > > or what ever. Does anyone have a pointer to docs on this. I am simply > > curious since there is obviously something I am missing. > > Using the ALTER TABLE page as an example... > > name > > The name (possibly schema-qualified) of an existing table to alter. If > ONLY is specified, only that table is altered. If ONLY is not specified, > the table and all its descendant tables (if any) are updated. * can be > appended to the table name to indicate that descendant tables are to be > altered, but in the current version, this is the default behavior. (In > releases before 7.1, ONLY was the default behavior. The default can be > altered by changing the configuration parameter sql_inheritance.) > Well, (*&^$%. I have read that very page, parts if it several times. B I was adding a column to a table, thought about it again and rather than look again I decided to ask. I hate that. I pride myself on not asking questions that can be easily answered but blew it this time. Thanks for the pointer. And for doing so without making me feel stupider than necessary. Bret