Hi, > The last statement was missing from the pg_dump output.
The fix looks good to me. I applied your patch to d9b5a63f49 and built with assertions enabled on macOS arm64. The pg_dump and pg_upgrade suites passed. The new test fails without the C change and passes with it. I also checked restores from plain, custom, directory and tar dumps, including parallel restore and restore as a non-superuser owner. Statistics targets were preserved for multiple expressions, quoted and renamed indexes, and values 0 and 10000. A same-version pg_upgrade preserved them too. The test could also use different targets for expression columns 1 and 3, with a plain column between them, as the existing ordinary-index test does. That would also cover pairing the column numbers with their targets. I tried this case separately and it works with the patch. I found the same omission in REL_14_STABLE through REL_19_STABLE by code inspection; I haven't built or tested those branches. I think this should be backpatched through 14. This looks ready for a committer. Best regards, Andrew Krylosov
