From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: CREATE PUBLICATION with 'publish_generated_columns' parameter specified but unassigned |
Date: | 2025-08-04 09:01:03 |
Message-ID: | CAA4eK1LkMgvgj5i2yA=7PeMbqX144yR8g7b46Thedg3wPgK-Wg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Aug 4, 2025 at 11:54 AM Peter Smith <smithpb2250(at)gmail(dot)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);
>
> ~~~
>
> Example:
>
> postgres=# create publication pub for table t with
> (publish_generated_columns=xxx);
> ERROR: invalid value for publication parameter
> "publish_generated_columns": "xxx"
> DETAIL: Valid values are "none" and "stored".
> postgres=# create publication pub for table t with (publish_generated_columns);
> CREATE PUBLICATION
> postgres=# \dRp pub
> List of publications
> Name | Owner | All tables | Inserts | Updates | Deletes | Truncates
> | Generated columns | Via root
> ------+----------+------------+---------+---------+---------+-----------+-------------------+----------
> pub | postgres | f | t | t | t | t
> | stored | f
> (1 row)
>
> ~~~
>
> However, I could not find this kind of shorthand specification (having
> no assigned value) mentioned anywhere in the PG docs [1].
>
> OTOH, I did see this is being tested/commented in 'publication.sql'
> [2], so perhaps that means it is deliberate?
>
> ~~~
>
> What is the verdict for this syntax -- ok or not?
>
I think we should give ERROR for this.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Fabrice Chapuis | 2025-08-04 09:09:11 | set role issue |
Previous Message | Yugo Nagata | 2025-08-04 08:57:49 | Re: Add backup_type to pg_stat_progress_basebackup |