Column merging for inherited tables aren't schema-qualified - Mailing list pgsql-hackers

From Thom Brown
Subject Column merging for inherited tables aren't schema-qualified
Date
Msg-id CAA-aLv4EQEatdMf4ap1VFD3+VkMz=SasDjzfDM1wGJmJrvsnWQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

I've noticed that if I alter the parent of a inheritance tree, there
can be ambiguity of which tables the column definitions were merged
with.

For example:

# CREATE SCHEMA remote;
CREATE SCHEMA

# IMPORT public FROM SERVER remote INTO remote;
IMPORT FOREIGN SCHEMA

# CREATE TABLE public.customers (LIKE remote.customers);
CREATE TABLE

# CREATE TABLE master_customers (LIKE remote.customers);
CREATE TABLE

# ALTER TABLE remote.customers INHERIT master_customers;
ALTER TABLE

# ALTER TABLE customers INHERIT master_customers;
ALTER TABLE

# ALTER TABLE customers SET WITH OIDS;
ALTER TABLE

# ALTER TABLE remote.customers SET WITH OIDS;
ALTER TABLE

# ALTER TABLE master_customers SET WITH OIDS;
NOTICE:  merging definition of column "oid" for child "customers"
NOTICE:  merging definition of column "oid" for child "customers"
ALTER TABLE

If we only got one of those merge notices, we wouldn't know which
table the notice referred to, although not particularly important in
this case.

I wonder if this should be changed so it would instead read:

# ALTER TABLE master_customers SET WITH OIDS;
NOTICE:  merging definition of column "oid" for child "remote.customers"
NOTICE:  merging definition of column "oid" for child "public.customers"

However, this is only one example of what is probably a fairly common
case of table ambiguity in log messages.

Thom



pgsql-hackers by date:

Previous
From: Huong Dangminh
Date:
Subject: Window2012R2: initdb error: "The current directory is invalid."
Next
From: Andreas Karlsson
Date:
Subject: Re: COPY (... tab completion