Re: Adding an extra boolean column to "information_schema.columns" or "pg_attribute"

From: PT <wmoran(at)potentialtech(dot)com>
To: GPT <gptmailinglists(at)gmail(dot)com>
Cc: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Adding an extra boolean column to "information_schema.columns" or "pg_attribute"
Date: 2017-12-30 20:08:32
Message-ID: 20171230150832.b1f208884afa1ccc14e715c7@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 30 Dec 2017 20:33:28 +0100
GPT <gptmailinglists(at)gmail(dot)com> wrote:

> Please visit the following link:
>
> https://stackoverflow.com/q/48028501/8895614
>
> but thing may go further/deeper than it seems.

Adding columns to a built-in system table is liable to cause all sorts of
problems in the future: when you upgrade, migrate to another server, need to
create dev environments, etc.

The view technique described in the stackunderwhelm article seems like
a good solution to me. Maybe if you could explain why you are against
it?

> Krds
>
> On 12/30/17, Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> wrote:
> > On Sat, Dec 30, 2017 at 08:17:34PM +0100, GPT wrote:
> >
> >> I would like to add an extra boolean attribute to table columns,
> >> something like NULL. Unfortunately Pg does not support such a feature:
> >>
> >> ADD ATTRIBUTE <attribute_name> TYPE <type_of_attribute> TO COLUMN
> >> <schema.table.column_name>;
> > ...
> >> I have already been suggested to use VIEW or dynamic SQL but I am
> >> looking something different.
> >
> > Can you explain why ?
> >
> > One thing that comes to mind is complex user types.
> >
> > Or columns of type table.
> >
> > Karsten
> > --
> > GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> > E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
> >
> >
>

--
Bill Moran

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-12-30 20:44:53 Re: Adding an extra boolean column to "information_schema.columns" or "pg_attribute"
Previous Message GPT 2017-12-30 19:33:28 Re: Adding an extra boolean column to "information_schema.columns" or "pg_attribute"