| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Cc: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column |
| Date: | 2024-07-29 02:23:43 |
| Message-ID: | 2455740.1722219823@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Peter Smith <smithpb2250(at)gmail(dot)com> writes:
> On Sat, Jul 27, 2024 at 11:15 PM PG Bug reporting form
> <noreply(at)postgresql(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2024-07-29 02:45:19 | Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column |
| Previous Message | Peter Smith | 2024-07-29 01:53:51 | Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column |