| From: | Chao Li <li(dot)evan(dot)chao(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: DOCS - DROP SUBSCRIPTION does not document parameter "IF EXISTS" |
| Date: | 2026-04-01 06:43:15 |
| Message-ID: | B28C43D4-B5D0-43FC-9DCB-2A01417A4EF3@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Apr 1, 2026, at 14:16, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi.
>
> I happened to notice that the "DROP PUBLICATION IF EXISTS" parameter
> is documented [1]
> ------
> IF EXISTS
> Do not throw an error if the publication does not exist. A notice is
> issued in this case.
> ------
>
> But, the equivalent "DROP SUBSCRIPTION IF EXISTS" parameter
> description is missing [2].
>
> ~~~
>
> PSA a patch to add similar documentation for DROP SUBSCRIPTION IF EXISTS.
>
> ======
> [1] https://www.postgresql.org/docs/devel/sql-droppublication.html
> [2] https://www.postgresql.org/docs/devel/sql-dropsubscription.html
>
> Kind Regards,
> Peter Smith.
> Fujitsu Australia
> <v1-0001-DOCS-Add-missing-description-for-DROP-SUBSCRIPTIO.patch>
Looks good. The patch uses the same phrase for “if exists” as the doc of “drop publication”. And I verified that a notice is issued:
```
evantest=# drop publication if exists aaa;
NOTICE: publication "aaa" does not exist, skipping
DROP PUBLICATION
evantest=# drop subscription if exists aaa;
NOTICE: subscription "aaa" does not exist, skipping
DROP SUBSCRIPTION
```
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-04-01 06:48:03 | Re: Reduce log level of some logical decoding messages to DEBUG1 |
| Previous Message | shveta malik | 2026-04-01 06:36:32 | Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication |