public inbox for [email protected]  
help / color / mirror / Atom feed
From: Weck, Luis <[email protected]>
To: [email protected] <[email protected]>
Subject: Constraints elimination during runtime
Date: Wed, 16 Apr 2025 11:16:32 +0000
Message-ID: <IA3PR10MB81133D5DD8051D7018DECD338DBD2@IA3PR10MB8113.namprd10.prod.outlook.com> (raw)

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



view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Constraints elimination during runtime
  In-Reply-To: <IA3PR10MB81133D5DD8051D7018DECD338DBD2@IA3PR10MB8113.namprd10.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox