Constraints elimination during runtime - Mailing list pgsql-performance

From Weck, Luis
Subject Constraints elimination during runtime
Date
Msg-id IA3PR10MB81133D5DD8051D7018DECD338DBD2@IA3PR10MB8113.namprd10.prod.outlook.com
Whole thread Raw
Responses Re: Constraints elimination during runtime
List pgsql-performance
I am not sure if this list is the most appropriate, but I figured I’d share it here…

If a column has a check constraint, such as CHECK (length(value) < 10) or even something like a VARCHAR(10) shouldn’t a query like this become a no-op/false instantly?

  create table test_constraint (
     value varchar(10) // could be a CHECK constraint also
  );

insert into test_constraint values (‘small’);

-- shouldn’t this qual always evaluate to false? 
select * from test_constraint where value = ‘way too big to fit anyway’; 

pgsql-performance by date:

Previous
From: Yura Sokolov
Date:
Subject: Re: many sessions wait on LWlock WALWrite suddenly
Next
From: Laurenz Albe
Date:
Subject: Re: Constraints elimination during runtime