From: bryan.love@iovation.com
To: pgsql-bugs@postgresql.org
Subject: BUG #7583: Problem using INHERITS and LIKE
Date: Wed, 03 Oct 2012 20:36:43 +0000
Message-ID: <E1TJVgR-0003GE-Rs@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 7583
Logged by: Bryan Love
Email address: bryan.love@iovation.com
PostgreSQL version: 9.2.1
Operating system: Centos 6
Description:
After creating a table using LIKE and INHERITS, if you drop a column from
the parent table that existed prior to creation of the child table, the
column will not be dropped from the child table.
Test Case:
=# create table foo(col1 int, col2 int);
=# create table bar (like foo) inherits (foo);
NOTICE: merging column "col1" with inherited definition
NOTICE: merging column "col2" with inherited definition
CREATE TABLE
=# alter table foo drop col1;
ALTER TABLE
=# \d bar
Table "public.bar"
Column | Type | Modifiers
--------+---------+-----------
col1 | integer |
col2 | integer |
Inherits: foo
--- copy/paste block commands ----
drop table bar;
drop table foo;
create table foo(col1 int, col2 int);
create table bar (like foo) inherits (foo);
alter table foo drop col1;
\d bar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bryan.love@iovation.com
Subject: Re: BUG #7583: Problem using INHERITS and LIKE
In-Reply-To: <E1TJVgR-0003GE-Rs@wrigleys.postgresql.org>
References: <E1TJVgR-0003GE-Rs@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox