From: | Xuneng Zhou <xunengzhou(at)gmail(dot)com> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Navneet Kumar <thanit3111(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: support virtual generated column not null constraint |
Date: | 2025-03-21 04:33:52 |
Message-ID: | CABPTF7U+_vtYNye6Dm9onh3B=Uzpn6AmEeeUbV_WpXLTbmyK4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
response from ChatGPT, seems correct:
"Consing up" is an informal term derived from Lisp terminology. In this
context, it means dynamically creating (allocating and constructing) a new
NullTest node. Instead of reusing an existing node, the code allocates a
fresh node—using PostgreSQL’s memory allocation (palloc) functions—and
fills in its fields (like the generation expression, null test type, etc.).
This new node is then prepared (compiled) for execution with
ExecPrepareExpr and used to evaluate whether the generated expression
returns a non-NULL value, thus enforcing the NOT NULL constraint on virtual
generated columns.
>
> + * We implement this by consing up a NullTest node for each virtual
> trivial question.
> I googled, and still found any explanation of the word "consing up".
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nisha Moond | 2025-03-21 04:50:10 | Re: Conflict detection for multiple_unique_conflicts in logical replication |
Previous Message | Amit Kapila | 2025-03-21 03:38:40 | Re: Separate GUC for replication origins |