Re: [Proposal] vacuumdb --schema only
От | Nathan Bossart |
---|---|
Тема | Re: [Proposal] vacuumdb --schema only |
Дата | |
Msg-id | 20220411183707.GA1960920@nathanxps13 обсуждение исходный текст |
Ответ на | Re: [Proposal] vacuumdb --schema only (Gilles Darold <gilles@migops.com>) |
Список | pgsql-hackers |
On Fri, Apr 08, 2022 at 05:16:06PM +0200, Gilles Darold wrote: > Attached v7 of the patch that should pass cfbot. Thanks for the new patch! Unfortunately, it looks like some recent changes have broken it again. > +enum trivalue schema_is_exclude = TRI_DEFAULT; > + > +/* > + * The kind of object filter to use. '0': none, 'n': schema, 't': table > + * these values correspond to the -n | -N and -t command line options. > + */ > +char objfilter = '0'; I think these should be combined into a single enum for simplicity and readability (e.g., OBJFILTER_NONE, OBJFILTER_INCLUDE_SCHEMA, OBJFILTER_EXCLUDE_SCHEMA, OBJFILTER_TABLE). > * Instead, let the server decide whether a given relation can be > * processed in which case the user will know about it. > */ > - if (!tables_listed) > + if (!objects_listed || objfilter == 'n') > { > appendPQExpBufferStr(&catalog_query, " WHERE c.relkind OPERATOR(pg_catalog.=) ANY (array[" > CppAsString2(RELKIND_RELATION) ", " I think this deserveѕ a comment. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: