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 63e3ce1b-79a6-6d66-f6ca-51623f9f4f58@migops.com
Whole thread Raw
In response to Re: [PATCH] Proposal for HIDDEN/INVISIBLE column  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Le 15/10/2021 à 20:51, Bruce Momjian a écrit :
> Why is this not better addressed by creating a view on the original
> table, even perhaps renaming the original table and create a view using
> the old table name.

Because when you use the view for the select you can not use the
"hidden" column in your query, for example in the WHERE or ORDER BY
clause.  Also if you have a hundred of tables, let's says with a
ts_vector column that you want to unexpand, you will have to create a
hundred of view.  The other problem it for write in the view, it you
have a complex modification involving other tables in the query you have
to define rules. Handling a technical column through a view over the
real table require lot of work, this feature will help a lot to save
this time.

-- 
Gilles Darold




pgsql-hackers by date:

Previous
From: Gilles Darold
Date:
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Next
From: Dilip Kumar
Date:
Subject: Re: Reset snapshot export state on the transaction abort