From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com> |
Subject: | Re: Virtual generated columns |
Date: | 2024-11-07 10:02:34 |
Message-ID: | CAEZATCXT6VO8Q3NBYMHr3YhiRzF=kmgvj41xU3qQOiNmzF7jTQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 5 Nov 2024 at 16:17, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> New patch version.
In expand_generated_columns_in_expr():
+ /*
+ * XXX For the benefit of triggers, make two passes, so it covers
+ * PRS2_OLD_VARNO and PRS2_NEW_VARNO.
+ */
+ node = expand_generated_columns_internal(node, rel, 1, rte);
+ node = expand_generated_columns_internal(node, rel, 2, rte);
It seems a bit messy to be doing these two passes in
expand_generated_columns_in_expr(), when it is only needed for
triggers. I think it was better the way it was in the v7 patch,
passing rt_index to expand_generated_columns_in_expr(), so that
TriggerEnabled() did this:
+ tgqual = (Node *)
expand_generated_columns_in_expr(tgqual, relinfo->ri_RelationDesc,
PRS2_OLD_VARNO);
+ tgqual = (Node *)
expand_generated_columns_in_expr(tgqual, relinfo->ri_RelationDesc,
PRS2_NEW_VARNO);
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | Nisha Moond | 2024-11-07 10:03:33 | Re: Introduce XID age and inactive timeout based replication slot invalidation |
Previous Message | Jakub Wartak | 2024-11-07 09:59:07 | failed optimization attempt for ProcArrayGroupClearXid(): using custom PGSemaphores that use __atomics and futexes batching via IO_URING |