Re: Virtual generated columns - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Virtual generated columns
Date
Msg-id 4ce78b84-f59b-4915-bb85-baba9b53e6c6@eisentraut.org
Whole thread Raw
In response to Re: Virtual generated columns  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Virtual generated columns
List pgsql-hackers
On 10.11.24 04:16, Amit Kapila wrote:
> The possible idea to replicate virtual generated columns is to compute
> the corresponding expression before sending the data to the client. If
> we can allow it in the row filter than why not to publish it as well.

Row filters have pretty strong restrictions for what kind of operations 
they can contain.  Applying those restrictions to virtual generated 
columns would probably not make that feature very useful.  (You want to 
use virtual columns for expressions that are too cumbersome to write out 
by hand every time.)

Moreover, we would have to implement some elaborate cross-checks if a 
table gets added to a publication.  How would that work?  "Can't add 
table x to publication because it contains a virtual generated column 
with a non-simple expression"?  With row filters, this is less of a 
problem, because the row filter a property of the publication.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Virtual generated columns
Next
From: Tomas Vondra
Date:
Subject: Re: Extract constants from EXECUTE queries