Re: Virtual generated columns

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Virtual generated columns
Date: 2024-07-23 04:03:57
Message-ID: CACJufxFPnT9m7zxrzbmLGpe2opZhM32QqKYyy-B=RyhteUgukQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

drop table t3;
CREATE TABLE t3( b bigint, c int GENERATED ALWAYS AS (b * 2) VIRTUAL);
insert into t3 (b) values (22147483647);
ANALYZE t3;

for ANALYZE
since column c has no actual storage, so it's not analyzable?
we need to change the function examine_attribute accordingly?

For the above example, for each insert row, we actually need to call
int84 to validate c value.
we probably need something similar to have ExecComputeStoredGenerated etc,
but we don't need to store it.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2024-07-23 04:20:32 Re: Statistics Import and Export
Previous Message Michael Paquier 2024-07-23 03:52:11 Re: Flush pgstats file during checkpoints