Re: CREATE PUBLICATION with 'publish_generated_columns' parameter specified but unassigned - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: CREATE PUBLICATION with 'publish_generated_columns' parameter specified but unassigned
Date
Msg-id CAKFQuwYFV=D2zOST4Beue76Hms9zQRfFvOHhA0eKpXPZZtzVmQ@mail.gmail.com
Whole thread Raw
In response to CREATE PUBLICATION with 'publish_generated_columns' parameter specified but unassigned  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: CREATE PUBLICATION with 'publish_generated_columns' parameter specified but unassigned
List pgsql-hackers
On Sunday, August 3, 2025, Peter Smith <smithpb2250@gmail.com> wrote:
Recently, I learned it is possible to say:

CREATE PUBLICATION pub ... WITH (publish_generated_columns);

This is equivalent to:
CREATE PUBLICATION pub ... WITH (publish_generated_columns = stored);


What is the verdict for this syntax -- ok or not?

Not.

An enum should not allow for an omitted value.  The documented policy of only booleans being allowed an optional value is what is expected.  I’d say this is a new-in-18 bug that should be fixed in the code.  The documentation is correct - absence of the option means “none”, presence requires an explicit value and not its own missing-value default.

David J.

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Potential deadlock in pgaio_io_wait()
Next
From: shveta malik
Date:
Subject: Re: Improve pg_sync_replication_slots() to wait for primary to advance