From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Smith <smithpb2250@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column
Date: Sun, 28 Jul 2024 22:23:43 -0400
Message-ID: <2455740.1722219823@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHut+Pt88zYZfWLj6jnMrQw1CwxeYtp1TmF7vrZ2F6Cyvb=5yQ@mail.gmail.com>
References: <18558-411bc81b03592125@postgresql.org>
<CAHut+Pt88zYZfWLj6jnMrQw1CwxeYtp1TmF7vrZ2F6Cyvb=5yQ@mail.gmail.com>
Peter Smith <smithpb2250@gmail.com> writes:
> On Sat, Jul 27, 2024 at 11:15 PM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> The following script:
>> CREATE TABLE t(a int);
>> CREATE PUBLICATION p FOR TABLE t(a);
>>
>> ALTER PUBLICATION p SET TABLE t (a, ctid);
>> triggers
>> ERROR: negative bitmapset member not allowed
> My fix:
> I feel the ALTER ... SET and CREATE PUBLICATION the same column list
> validation logic. But instead of cut/pasting that validation checking
> from publication_translate_columns(), attached is a diff patch that
> exposes the publication_translate_columns() so we can just call that
> same function.
Agreed on that, but shouldn't this patch also be removing some code
from the ALTER ... SET path? Or is that part of the cleanup you
handwaved about?
> If this is deemed an acceptable fix, then I will improve on it (e.g.
> IMO publication_translate_columns can modified to return the BMS), and
> I will also add the necessary test cases.
Have at it ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, smithpb2250@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column
In-Reply-To: <2455740.1722219823@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox