Re: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: dafoer_x(at)163(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.
Date: 2022-04-12 14:27:44
Message-ID: CAKFQuwYwhyZDkR2RmQ8ns7p=gVjBumU_Broh_VC9JMTkOpcotA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Apr 12, 2022 at 7:16 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 17464
> Logged by: Domain type. If the value field(CREATE DOMAIN) is set
> to null, errors cannot
> be intercepted.
> Email address: dafoer_x(at)163(dot)com
> PostgreSQL version: 13.2
> Operating system: centos7.6 x86
> Description:
>
> Domain type. If the value field(CREATE DOMAIN) is set to null, errors
> cannot
> be intercepted.
> Because texteq cannot accept null input parameters,
> op->d.domainCheck.checknull is set to the wrong value .
>

I'm not really following, and don't have time to investigate this right
now, but:

CREATE DOMAIN xb AS TEXT CHECK
> (
> VALUE = '男'
> OR VALUE ='女'
> OR VALUE = null
> );
>
>
"VALUES = null" is simply wrong. That isn't how one checks for null. Use
"IS NULL". If that restores the correct behavior I'm unsure what we'd be
willing to do to behave differently in the presence of the improper null
test form.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-04-12 14:41:46 Re: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.
Previous Message PG Bug reporting form 2022-04-12 12:41:23 BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.