Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gilles Darold <gilles(at)migops(dot)com>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Date: 2021-10-14 18:08:51
Message-ID: CAKFQuwZn=+MFTDBXoVLpmoSVPDh53cHmjGqUK_W8eY3Z4=LU0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, October 14, 2021, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Gilles Darold <gilles(at)migops(dot)com> writes:
> > Le 14/10/2021 à 17:38, Jaime Casanova a écrit :
> >> On Thu, Oct 14, 2021 at 01:16:45PM +0200, Gilles Darold wrote:
>
> > Why not, I will add it if there is a consencus about logging hidden
> > column use, this is not a big work.
>
> This seems like a completely orthogonal idea.

>
+1

> As for the proposal itself, I'm kind of allergic to the terminology
> you've suggested, because the column is in no way hidden. It's
> still visible in the catalogs, you can still select it explicitly,
> etc. Anybody who thinks this is useful from a security standpoint
> is mistaken, but these words suggest that it is. Perhaps some
> terminology like "not expanded" or "unexpanded" would serve better
> to indicate that "SELECT *" doesn't expand to include the column.
> Or STAR versus NO STAR, maybe.

Taking this a bit further, I dislike tying the suppression of the column
from the select-list star to the behavior of insert without a column list
provided. I’m not fully on board with having an attribute that is not
fundamental to the data model but rather an instruction about how that
column interacts with SQL; separating the two aspects, though, would help.
I accept the desire to avoid star expansion much more than default columns
for insert. Especially since the most compelling example of the later, not
having to specify generated columns on insert, would directly conflict with
the fact that it is those generated columns that are most likely to be
useful to display when specifying a star in the select query.

> What I think is actually important is the ALTER COLUMN syntax.
> We could easily get away with having that be the only syntax for
> this --- compare the precedent of ALTER COLUMN SET STATISTICS.

+1

>
> BTW, you do NOT get to add an information_schema column for
> this.

FWIW, +1, though the project policy reminder does stand on its own.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-10-14 18:14:18 Re: refactoring basebackup.c
Previous Message Isaac Morland 2021-10-14 18:03:11 Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?