Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, exclusion@gmail.com,
pgsql-bugs@lists.postgresql.org
Date: 2024-08-14T04:51:33Z
Lists: pgsql-bugs
On Mon, Aug 12, 2024 at 5:45 PM David Rowley <dgrowleyml@gmail.com> wrote: > ... > > Here's the patch updated to do the validation inside AlterPublicationTables(). > Hi David, I think we've come full circle -- your fix is now pretty much the same as my v3 patch [1]. The main difference is you have taken the opportunity to tidy some of the surrounding functions at the same time as making the fix. Your patch looks good to me. ~~~ publication_add_relation: nit - variable /Bitmapset *columns;/Bitmapset *attnums;/ nit - comment /validate and translate.../Validate and translate.../ publication_validate_column_list: nit - consider renaming this function to 'pub_collist_validate' (just to be more like the existing 'pub_collist_to_bitmapset') ====== [1] https://www.postgresql.org/message-id/CAHut%2BPtp6Ztk-Dst_WDmQpAw%2BZy9EbP_8QSNk5NkDEjP%3D8xK-A%40mail.gmail.com Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
Improve ALTER PUBLICATION validation and error messages
- 80ffcb842748 18.0 landed