Re: Adding type info etc for inheritance errmsg: "child table is missing column ..."

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vik Fearing <vik(at)2ndquadrant(dot)fr>, Ryan Murphy <ryanfmurphy(at)gmail(dot)com>, PostgreSQL DEV mailing list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding type info etc for inheritance errmsg: "child table is missing column ..."
Date: 2017-01-13 16:36:41
Message-ID: 20170113163641.2spjxu5ee2ov3uho@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> AFAICS, what Ryan is after would be better served by a separate tool that
> would produce a "diff" of the two tables' schemas. Even if we were
> willing to overload this error message with everything we know about the
> parent column, do you really want to fix discrepancies one column at a
> time? And what about properties that can't be uniquely associated with a
> single column, such as constraints covering multiple columns?
>
> Also, I have a feeling that a suitable tool is already out there. A
> moment's digging in the list archives found this thread with links to
> several candidates:
>
> https://www.postgresql.org/message-id/flat/561D27E7.5010906%40trustport.com
>
> and I'm pretty sure there have been other such discussions.

I remember looking some time ago, and most of all the possible
candidates were either abandoned or terribly cumbersome to use. I ran
across Euler Taveira in a conference sometime later and he told me he
had the idea of working on writing such a tool. I was pleased to see
his announcement recently:
https://www.postgresql.org/message-id/6c9d4a85-55b5-81cc-6f09-8f26a6da2072@timbira.com.br
I admit I have not looked at his code, but he had some very good ideas
for the complex cases. I think it's worth checking out what he has
done.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2017-01-13 16:42:23 Re: PoC: Grouped base relation
Previous Message Daniel Verite 2017-01-13 16:18:18 Re: sequence data type