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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ryan Murphy <ryanfmurphy(at)gmail(dot)com>
Cc: 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-07 17:39:02
Message-ID: 26581.1483810742@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ryan Murphy <ryanfmurphy(at)gmail(dot)com> writes:
> The attached patch is my initial attempt at adding the type, making the
> error message read e.g.:
> ERROR: child table is missing column "name" text

"... column "name" of type text", perhaps? Does not read very nicely
as is.

> I'm sure it needs work (in particular I borrowed a lot of the get-type-name
> logic from getTypeOutputInfo() so probably needs a factor),

The approved way to do this is with format_type_be(), or
format_type_with_typemod() if you want to include typmod info, which
I think you probably do for the intended use-case.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Murphy 2017-01-07 18:19:15 Re: Adding type info etc for inheritance errmsg: "child table is missing column ..."
Previous Message Bruce Momjian 2017-01-07 17:20:00 Re: [WIP]Vertical Clustered Index (columnar store extension)