Re: Review items for EXCEPT TABLE publication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Review items for EXCEPT TABLE publication
Date: 2026-09-11 11:06:13
Message-ID: CAA4eK1J96bb9QkpGbYkv2RJKxR_-LqLib7Ebpfhfk2ZU9zuPyw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 11, 2026 at 3:13 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Fri, 11 Sept 2026 at 13:57, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > I don't really see what is gained by splitting those error messages,
> > since the user will get an indeterminate one, and either way they have
> > to fix it
> >
> > IMO, a single unified message could be a simpler/better choice here:
> >
> > e.g.
> >
> > ereport(ERROR,
> > (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> > errmsg("cannot change table \"%s\" to unlogged because it is
> > referenced by a publication",
> > RelationGetRelationName(rel)),
> > errdetail("Unlogged relations cannot be published or excluded via
> > an EXCEPT clause."),
> > errhint("Remove the table from the publication first.")));
>
> I agree with this approach. A single unified error message is better,
> especially since the user needs to remove the table from the
> publication either way.
>

I am fine with the single message but how about changing the HINT to:
"Drop the table from the publication, or remove it from the
publication's EXCEPT clause, first." because the proposed message is
not suitable for the EXCEPT case.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-09-11 11:11:29 Re: PGQ catalog representation and pg_dump support
Previous Message Jim Jones 2026-09-11 10:58:50 Re: Add a permission check to pg_stat_get_backend_subxact()