Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column - Mailing list pgsql-bugs

From Peter Smith
Subject Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column
Date
Msg-id CAHut+Pt0A3-1nqb0WaEsaQU3mtdw_gSGCFDj2CbR=Z_b3BHPsA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column  (David Rowley <dgrowleyml@gmail.com>)
List 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



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: a row is not inserted in nested INSERT ON CONFLICT
Next
From: "Rainer J.H. Brandt"
Date:
Subject: Re: BUG #18581: psql symbol append_history not found when quitting