]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Improve code comment
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 1 Jul 2025 16:42:07 +0000 (18:42 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 1 Jul 2025 16:42:07 +0000 (18:42 +0200)
The previous wording was potentially confusing about the impact of the
OVERRIDING clause on generated columns.  Reword slightly to avoid
that.

Reported-by: jian he <jian.universality@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxFMBe0nPXOQZMLTH4Ry5Gyj4m%2B2Z05mRi9KB4hk8rGt9w%40mail.gmail.com

src/backend/rewrite/rewriteHandler.c

index 2ef0e7fbf3a69da43ec80a6f6ab3b0341d4d3232..adc9e7600e1ed4173b94addb5b60797ed9e76a57 100644 (file)
@@ -923,8 +923,9 @@ rewriteTargetListIU(List *targetList,
                                apply_default = true;
 
                        /*
-                        * Can only insert DEFAULT into generated columns, regardless of
-                        * any OVERRIDING clauses.
+                        * Can only insert DEFAULT into generated columns.  (The
+                        * OVERRIDING clause does not apply to generated columns, so we
+                        * don't consider it here.)
                         */
                        if (att_tup->attgenerated && !apply_default)
                        {