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 94bab180-e6c7-0ff8-7131-8b21454d3c76@migops.com
Whole thread Raw
In response to Re: [PATCH] Proposal for HIDDEN/INVISIBLE column  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Responses Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
List pgsql-hackers
Le 14/10/2021 à 17:38, Jaime Casanova a écrit :
> On Thu, Oct 14, 2021 at 01:16:45PM +0200, Gilles Darold wrote:
>> Hi,
>>
>>
>> Here is a proposal to implement HIDDEN columns feature in PostgreSQL.
>>
> Great! Actually I found this very useful, especially for those people
> using big fields (geometry, files, large texts).
>
>> The user defined columns are always visible in the PostgreSQL. If user
>> wants to hide some column(s) from a SELECT * returned values then the
>> hidden columns feature is useful. Hidden column can always be used and
>> returned by explicitly referring it in the query.
>>
>> I agree that views are done for that or that using a SELECT * is a bad
>> practice
> An a common one, even if we want to think otherwise. I have found that
> in almost every customer I have the bad luck to get to see code or
> SELECTs.
>
> Not counting that sometimes we have columns for optimization like Dave
> saved about hidden a ts_vector column.
>
> Another use case I can think of is not covered in this patch, but it
> could be (I hope!) or even if not I would like opinions on this idea.
> What about a boolean GUC log_hidden_column that throws a LOG message when
> a hidden column is used directly?
>
> The intention is to mark a to-be-deleted column as HIDDEN and then check
> the logs to understand if is still being used somewhere. I know systems
> where they carry the baggage of deprecated columns only because they
> don't know if some system is still using them.
>
> I know this would be extending your original proposal, and understand if
> you decide is not a first patch material.


Why not, I will add it if there is a consencus about logging hidden 
column use, this is not a big work.


-- 
Gilles Darold




pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Next
From: Isaac Morland
Date:
Subject: Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?