Re: Does postgresql know the check condition is valid or not. or can check deduce from multiple conditions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jian He <hejian(dot)mark(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: Does postgresql know the check condition is valid or not. or can check deduce from multiple conditions
Date: 2022-04-06 04:10:25
Message-ID: 2977557.1649218225@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jian He <hejian(dot)mark(at)gmail(dot)com> writes:
> CREATE TABLE emp (test_check int check ( test_check >1 and test_check
> < 0 ));

> Even with the above mentioned step, does postgresql know above check
> constraint condition always false.

No, not explicitly. If the constraint always fails, that is
your problem not Postgres'.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2022-04-06 04:33:47 Re: Does postgresql know the check condition is valid or not. or can check deduce from multiple conditions
Previous Message Jian He 2022-04-06 04:07:55 Does postgresql know the check condition is valid or not. or can check deduce from multiple conditions