MergeAttributes type (mod) conflict error detail

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: MergeAttributes type (mod) conflict error detail
Date: 2015-12-25 07:45:35
Message-ID: 567CF41F.2060207@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
merge-attr-err-detail-improv.patch text/x-diff 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2015-12-25 10:00:35 Re: Optimization for updating foreign tables in Postgres FDW
Previous Message Kyotaro HORIGUCHI 2015-12-25 05:31:59 Re: [POC] FETCH limited by bytes.