pgsql: Throw ERROR when publish_generated_columns is specified without

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Throw ERROR when publish_generated_columns is specified without
Date: 2025-08-05 09:46:33
Message-ID: E1ujEFd-000r0q-0i@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Throw ERROR when publish_generated_columns is specified without a value.

Previously, specifying the publication option 'publish_generated_columns'
without an explicit value would incorrectly default to 'stored', which is
not the intended behavior.

This patch fixes the issue by raising an ERROR when no value is provided
for 'publish_generated_columns', ensuring that users must explicitly
specify a valid option.

Author: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: vignesh C <vignesh21(at)gmail(dot)com>
Backpatch-through: 18, where it was introduced
Discussion: https://postgr.es/m/CAHut+PsCUCWiEKmB10DxhoPfXbF6jw5RD9ib2LuaQeA_XraW7w@mail.gmail.com

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e5d04aedaf3a0e62dc22c42206bd258db24adddc

Modified Files
--------------
src/backend/commands/publicationcmds.c | 20 ++++++++++----------
src/test/regress/expected/publication.out | 15 ++++-----------
src/test/regress/sql/publication.sql | 7 ++-----
3 files changed, 16 insertions(+), 26 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-08-05 09:47:32 pgsql: Fix various hash function uses
Previous Message Peter Eisentraut 2025-08-05 08:58:43 pgsql: Fix mixups of FooGetDatum() vs. DatumGetFoo()