X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E5A3CD1B16A for ; Mon, 19 Jul 2004 13:16:52 -0300 (ADT) 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 47447-04 for ; Mon, 19 Jul 2004 16:16:44 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id D58EED1B1CE for ; Mon, 19 Jul 2004 13:16:43 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id B8F9C3550F; Mon, 19 Jul 2004 09:16:42 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id B77CF3550E; Mon, 19 Jul 2004 09:16:42 -0700 (PDT) Date: Mon, 19 Jul 2004 09:16:42 -0700 (PDT) From: Stephan Szabo To: Tsirkin Evgeny Cc: pgsql-admin@postgresql.org Subject: Re: inheritance question In-Reply-To: Message-ID: <20040719091441.F86768@megazone.bigpanda.com> References: <20040718215354.I71415@megazone.bigpanda.com> 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.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/216 X-Sequence-Number: 14284 On Mon, 19 Jul 2004, Tsirkin Evgeny wrote: > But this way i will touch both the schema AND data > And what i want is to change the schema ONLY. The use the ALTER TABLE table* ADD COLUMN syntax to alter the schema for table and its descendants. In general, SQL_INHERITANCE=false is primarily there for applications that were written for older versions of PostgreSQL. You probably should be using queries that use the ONLY keyword rather than relying on the guc variable. > On Sun, 18 Jul 2004, Stephan Szabo wrote: > > > On Tue, 13 Jul 2004, evgeny tsurkin wrote: > > > > > Hi All! > > > That probably was already asked thousand times > > > but i did not find an exact answer: > > > I want to have two tables the second one will have > > > all the columns from the first + some extra .The data > > > should be complittly separate .I was trying to use > > > inheritance and setted the SQL_INHERITANCE = false > > > to separate the data ,but when trying to add a column > > > to the father i have got an error: > > > ERROR: Attribute must be added to child tables too > > > what can i do ? > > > > Either don't use SQL_INHERITANCE=false, or specify that you want > > to act upon the entire tree using the older syntax which I think > > would look like ALTER TABLE first* add column ... > > (note the *)