From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: [BUGS] Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns |
Date: | 2014-09-01 20:00:41 |
Message-ID: | 20140901200040.GC19338@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Sun, Aug 31, 2014 at 02:10:33PM -0400, Tom Lane wrote:
> David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > Would it be proper to issue an additional top-level warning with the column
> > moved notification? Thus there would be NOTICE, NOTICE, WARNING in the
> > above example? Or, more generically, "columns reordered to match inherited
> > column order" to avoid multiple warnings if more than one column is moved.
>
> That's a good point: if this message fires at all, it will probably fire
> more than once; do we want that? If we do it as you suggest here, we'll
> lose the information as to exactly which columns got relocated, which
> perhaps is bad, or maybe it doesn't matter. Also, I don't remember the
> exact code structure in that area, but it might be a bit painful to
> arrange that we get only one such warning even when inheriting from
> multiple parents.
>
> If we do want the specific moved columns to be identified, I'd still go
> with errdetail on the NOTICE rather than two separate messages. I think
> calling it a WARNING is a bit extreme anyway.
OK, here is the updated output based on the comments:
CREATE TABLE B(a int, c int);
CREATE TABLE a5 (
a integer,
b integer,
c integer
)
INHERITS (b);
NOTICE: merging column "a" with inherited definition
NOTICE: moving and merging column "c" with inherited definition
DETAIL: user-specified column moved to the location of the inherited
column
I think we have to mention "move" in the error message because
mentioning "move" only in the detail means that the detail actually has
new information, not more detailed information.
Patch attached.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
Attachment | Content-Type | Size |
---|---|---|
inh-warning.diff | text/x-diff | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-09-01 20:06:58 | Re: Re: [BUGS] Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns |
Previous Message | Tom Lane | 2014-09-01 17:01:54 | Re: BUG #11321: describe command is getting locked due to ALTER statement running on public table |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-09-01 20:03:04 | Re: Patch for psql History Display on MacOSX |
Previous Message | Joel Jacobson | 2014-09-01 19:52:44 | Re: PL/pgSQL 2 |