Re: check contraint allows illegal value?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: missive(at)hotmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: check contraint allows illegal value?
Date: 2001-07-20 16:05:37
Message-ID: 3797.995645137@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

missive(at)frontiernet(dot)net (Lee Harr) writes:
> Is this a bug?

> create table foo( c char(2)
> check (c in ('09', '10', '11', '12', 'n/a'))
> );

I don't think so; at least, I don't think there's any way in the general
case for the system to realize that some part of a check condition can
never succeed or never fail. (See "halting problem".)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Felipe Alvarez Harnecker 2001-07-20 18:54:18 Documentation Bug related to Inheritance
Previous Message Bruce Momjian 2001-07-20 15:17:26 Re: libpgtcl doesn't use UTF encoding of TCL