Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

From: Gilles Darold <gilles(at)migops(dot)com>
To: Vik Fearing <vik(at)postgresfriends(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Date: 2021-10-17 21:42:04
Message-ID: 65fb3cf3-950a-4592-2d14-3fce9835af1e@migops.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 17/10/2021 à 23:04, Vik Fearing a écrit :
> On 10/17/21 11:01 PM, Gilles Darold wrote:
>>   - Add a check into SET UNEXPANDED code to verify that there is at
>> least one column expanded.
> What is the point of this? Postgres allows column-less tables.
>
> Both of these statements are valid:
>
> - CREATE TABLE nada ();
> - SELECT;

Yes, my first though was to allow all columns to be unexpandable like a
table without column, but the the problem is that when you execute
"SELECT * FROM nada" it returns no rows which is not the case of a table
with hidden column. I could fix that to return no rows if all columns
are unexpandable but I think that all column hidden is a nonsens so I
have prefered to not allow it and an error is raised.

Also I've just though that applying unexpandable column feature to
plpgsql breaks the use of ROWTYPE. It contains all columns so when use
as a variable to receive a SELECT * or RETURNING * INTO it will not
works, I will try to fix that.

--
Gilles Darold

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-10-17 21:43:15 Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619
Previous Message Tomas Vondra 2021-10-17 21:23:49 Re: XTS cipher mode for cluster file encryption