MergeAttributes type (mod) conflict error detail - Mailing list pgsql-hackers

From Amit Langote
Subject MergeAttributes type (mod) conflict error detail
Date
Msg-id 567CF41F.2060207@lab.ntt.co.jp
Whole thread Raw
Responses Re: MergeAttributes type (mod) conflict error detail  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wonder if the following error detail text could say more than it does
currently for the following rather artificial example case:

CREATE TABLE p1(a char(3));
CREATE TABLE p2(a char(2));

CREATE TABLE c(d int) INHERITS (p1, p2);
NOTICE:  merging multiple inherited definitions of column "a"
ERROR:  inherited column "a" has a type conflict
DETAIL:  character versus character

Any specific reason why it doesn't spell out typmods in the above detail
message?

I managed to get the following with the attached:

CREATE TABLE c(a int) INHERITS (p1, p2);
NOTICE:  merging multiple inherited definitions of column "a"
ERROR:  inherited column "a" has a type conflict
DETAIL:  character(3) versus character(2)

CREATE TABLE c(a int) INHERITS (p1);
NOTICE:  merging column "a" with inherited definition
ERROR:  column "a" has a type conflict
DETAIL:  character(3) versus integer

Thoughts?

Thanks,
Amit

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [POC] FETCH limited by bytes.
Next
From: Etsuro Fujita
Date:
Subject: Re: Optimization for updating foreign tables in Postgres FDW