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 27A8E8B9C1E for ; Sat, 19 Feb 2005 03:15:34 +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 51420-06 for ; Sat, 19 Feb 2005 03:15:29 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id E17828B9C0E for ; Sat, 19 Feb 2005 03:15:32 +0000 (GMT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 7485535360; Fri, 18 Feb 2005 19:15:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 72F3C35321; Fri, 18 Feb 2005 19:15:30 -0800 (PST) Date: Fri, 18 Feb 2005 19:15:30 -0800 (PST) From: Stephan Szabo To: Bret Hughes Cc: postgresql sql list Subject: Re: what does ONLY do In-Reply-To: <1108778394.9866.498.camel@bretsony> Message-ID: <20050218191259.I39081@megazone.bigpanda.com> References: <1108778394.9866.498.camel@bretsony> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/216 X-Sequence-Number: 20327 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.)