Re: Improve readability by using designated initializers when possible
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: jian he <jian.universality@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Japin Li <japinli@hotmail.com>,
Jelte Fennema-Nio <postgres@jeltef.nl>, Jeff Davis <pgsql@j-davis.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>,
pgsql-hackers@lists.postgresql.org
Date: 2024-03-18T07:09:14Z
Lists: pgsql-hackers
Attachments
- v4-0001-Remove-ObjectClass.patch (text/plain) patch v4-0001
On 14.03.24 01:26, Michael Paquier wrote: > -EventTriggerSupportsObjectClass(ObjectClass objclass) > +EventTriggerSupportsObject(const ObjectAddress *object) > > The shortcut introduced here is interesting, but it is inconsistent. > HEAD treats OCLASS_SUBSCRIPTION as something supported by event > triggers, but as pg_subscription is a shared catalog it would be > discarded with your change. Subscriptions are marked as supported in > the event trigger table: > https://www.postgresql.org/docs/devel/event-trigger-matrix.html Ah, good catch. Subscriptions are a little special there. Here is a new patch that keeps the switch/case arrangement in that function. That also makes it easier to keep the two EventTriggerSupports... functions aligned. Also added a note about subscriptions and a reference to the documentation.
Commits
-
Remove ObjectClass type
- 89e5ef7e2181 17.0 landed
-
Simplify pg_enc2gettext_tbl[] with C99-designated initializer syntax
- 655dc310460c 17.0 landed
-
Use C99-designated initializer syntax for arrays related to encodings
- ada87a4d95fc 17.0 landed
-
Remove last NULL element in config_group_names[]
- 48920476b490 17.0 landed
-
Use C99-designated initializer syntax for more arrays
- afd8ef39094b 17.0 landed
-
Remove unnecessary array object_classes[] in dependency.c
- ef5e2e90859a 17.0 landed
-
Add trailing commas to enum definitions
- 611806cd726f 17.0 cited