Re: [PATCH] Proposal for HIDDEN/INVISIBLE column - Mailing list pgsql-hackers

From Gilles Darold
Subject Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Date
Msg-id 65fb3cf3-950a-4592-2d14-3fce9835af1e@migops.com
Whole thread Raw
In response to Re: [PATCH] Proposal for HIDDEN/INVISIBLE column  (Vik Fearing <vik@postgresfriends.org>)
Responses Re: [PATCH] Proposal for HIDDEN/INVISIBLE column  (Isaac Morland <isaac.morland@gmail.com>)
List 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




pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: XTS cipher mode for cluster file encryption
Next
From: Justin Pryzby
Date:
Subject: Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619