Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WOU49-0000lJ-PZ for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2014 15:30:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WOU49-0001cN-8C for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2014 15:30:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTYp-0006o6-B1 for pgsql-bugs@postgresql.org; Fri, 14 Mar 2014 14:58:11 +0000 Received: from mail-pa0-f53.google.com ([209.85.220.53]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTYh-0003iy-9I for pgsql-bugs@postgresql.org; Fri, 14 Mar 2014 14:58:10 +0000 Received: by mail-pa0-f53.google.com with SMTP id ld10so2730333pab.12 for ; Fri, 14 Mar 2014 07:58:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=f43fXcUnBzxG06c7ieHiJ1sm0BrOIkJt8fz4Q2Zdh18=; b=WGvUYH4CVnU1g6hDXyW1LAv6M4gc8FAgmsF3XIvf/DcnZF+OZaLEoolHft12Um0e5Q En4OLCiO3AHJEMOZPJObqBzDPvpBJvHPRthIFheaJwWOWeSosLDtQsYNYfKCSZXM4Sqy f8GbC5dGYQ1fzPX26Qf4pJb07rleMgWJf3wOSogF1xSCQ83wTvaqMBJeRYKHDcjcq1FC 8jAkbzVP2gM2Jim54wGVS6sK0fWDyDEsA3fQdhnEf4h+LgUpz05aYUpbMqVQX2WDgRgd BLlOPNPuF7nbo1JXwQnoIfkwhbBP6TQqI1vgj56Px/4G9nHGXCtuqVAT7RsR4cm+E3j6 76qQ== X-Gm-Message-State: ALoCoQns5Pe7yHkFqhwvUFd7fxJX6Bqqcq3Ex54DJUtLm62CnOFpOhxUQIRAE8cNXm4fTwCTS8Ae X-Received: by 10.66.65.204 with SMTP id z12mr9728373pas.60.1394809080902; Fri, 14 Mar 2014 07:58:00 -0700 (PDT) Received: from olduvai.majid.org (m208-9.dsl.rawbw.com. [198.144.208.9]) by mx.google.com with ESMTPSA id ug9sm17428891pbc.11.2014.03.14.07.57.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 07:57:58 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns From: Fazal Majid In-Reply-To: <15349.1394720340@sss.pgh.pa.us> Date: Fri, 14 Mar 2014 07:54:43 -0700 Cc: Alvaro Herrera , pgsql-bugs@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140313043900.398.17129@wrigleys.postgresql.org> <20140313134739.GD4744@eldon.alvh.no-ip.org> <15349.1394720340@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.1874) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Mar 13, 2014, at 7:19, Tom Lane wrote: > Alvaro Herrera writes: >> majid@apsalar.com wrote: >>> Reproduction case: >>>=20 >>> create table A(a int, b int, c int); >>> create table B(a int, c int); >>> alter table A inherit B; >=20 >> I wonder if the real fix here is to have ALTER / INHERIT error out of >> the columns in B are not a prefix of those in A. >=20 > Years ago, we sweated quite a lot of blood to make these cases work. > I'm not thrilled about throwing away all that effort because one person > doesn't like the behavior. That makes sense, but then it would make sense to document this behavior un= der ALTER TABLE ... INHERIT, and possibly change its behavior so it reorder= s the columns on the source database=92s data dictionary (I am not sure whe= ther the logical column order has to match the physical order already embed= ded in the data files). Thanks, -- Fazal Majid CTO, Apsalar Inc. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs