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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.
Дата
Msg-id CAKFQuwYwhyZDkR2RmQ8ns7p=gVjBumU_Broh_VC9JMTkOpcotA@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.
Список pgsql-bugs
On Tue, Apr 12, 2022 at 7:16 AM PG Bug reporting form <noreply@postgresql.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@163.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17464: Domain type. If the value field(CREATE DOMAIN) is set to null, errors cannot be intercepted.