Repository navigation
Add support for the publish_generated_columns option to publications. #9049 - #10841
Conversation
…gadmin-org#9049 PostgreSQL 18 adds the publish_generated_columns publication option, which takes 'none' (the default) or 'stored'. Add it to the publication dialog for PostgreSQL 18 and later, with new 18_plus SQL templates for create, alter and properties, and emit it in the reverse-engineered SQL when set to 'stored'. Closes pgadmin-org#9049
|
No actionable comments were generated in the recent review. WalkthroughThe publication dialog adds a PostgreSQL 18 option for publishing generated columns. PostgreSQL and PPAS templates generate creation and update SQL and return the setting in publication properties. Tests cover publication scenarios, including changes between ChangesPublication generated-column setting
Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant PublicationDialog
participant CreateTemplate
participant PostgreSQL
participant PropertiesQuery
PublicationDialog->>CreateTemplate: selected generated-column setting
CreateTemplate->>PostgreSQL: CREATE PUBLICATION with stored option when selected
PublicationDialog->>PropertiesQuery: request publication properties
PropertiesQuery->>PostgreSQL: select publication catalog values
PostgreSQL-->>PropertiesQuery: generated-column mode
PropertiesQuery-->>PublicationDialog: stored or none
PublicationDialog->>UpdateTemplate: changed generated-column setting
UpdateTemplate->>PostgreSQL: ALTER PUBLICATION for changed setting
Suggested reviewers: Merge Risk:
|
Summary
publish_generated_columnspublication option (enum:none, the default, orstored; it does not exist before 18). The publication dialog now shows a Publish generated columns select in Options > With for PostgreSQL 18 and later.18_plustemplate bucket (pg and ppas) forcreate.sql,update.sqlandproperties.sql: properties mapspg_publication.pubgencolstonone/stored, create adds the option to theWITHclause when set tostored, and alter emitsALTER PUBLICATION ... SET (publish_generated_columns = ...), rendering only the two accepted values.stored, so the existing expected output for publications on PostgreSQL 18 is unchanged.publication_dialog.rst.Test plan
runtests.py --pkg resql --modules publicationson PostgreSQL 18, with a newtests/18_plus/test.json(the 15_plus scenarios plus create withstored, alter tonone, alter back tostored)--pkg browser.server_groups.servers.databases.publications.tests): 53 passedpublication.ui.spec.jsand eslint onpublication.ui.jsCloses #9049
Summary by CodeRabbit