Constraints elimination during runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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’; 


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux