> On 8 Feb 2024, at 11:55, Peter Eisentraut <peter@eisentraut.org> wrote:
> A few more quick comments:
Thanks for reviewing!
> I think the .report_text assignments also need a gettext_noop(), like the .status assignments.
Done in the attached.
> The type DataTypesUsageChecks is only used in check.c, so doesn't need to be in pg_upgrade.h.
Fixed.
> Idea for further improvement: Might be nice if the DataTypesUsageVersionCheck struct also included the applicable
versioninformation, so the additional checks in version.c would no longer be necessary.
I tried various variants of this when writing it, but since the checks aren't
just checking version but also include catalog version checks it became messy.
One option could perhaps be to include a version number for <= comparison, and
if set to zero a function pointer to a version check function must be provided?
That would handle the simple cases in a single place without messy logic, and
leave the more convoluted checks with a special case function.
--
Daniel Gustafsson