Re: refactor AlterDomainAddConstraint (alter domain add constraint)

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refactor AlterDomainAddConstraint (alter domain add constraint)
Date: 2024-12-06 16:01:53
Message-ID: CACJufxF_-Gx0WvXiTFD0TyamHTh8_jJzoaMmpkmJ4VBG_nDd3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 6, 2024 at 10:48 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2024-Dec-06, jian he wrote:
>
> > basically processCASbits
> > from
> > processCASbits($3, @3, "NOT NULL")
> > processCASbits($5, @5, "CHECK")
> > to
> > processCASbits($3, @3, "DOMAIN with NOT NULL")
> > processCASbits($5, @5, "DOMAIN with CHECK")
>
> This doesn't actually work from a translation point of view, because the
> actual error message is split in two parts. I think it might be better
> to pass a non-NULL variable to processCASbits, then in the caller check
> whether that flag is true; if so, raise the error in a single ereport().
>

i let the error fail at AlterDomainAddConstraint.

what do you think?

Attachment Content-Type Size
v2-0001-refactor-AlterDomainAddConstraint.patch text/x-patch 14.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-12-06 16:22:44 Re: Remove dependence on integer wrapping
Previous Message Maxim Orlov 2024-12-06 15:52:20 Re: Potential null pointer dereference in postgres.c