Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group