Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f8c23c

Browse files
committed
Improve predtest.c's ability to reason about operator expressions.
We have for a long time been able to prove implications and refutationsbetween clauses structured like "expr op const" with the same subexpressionand btree-related operators; for example that "x < 4" implies "x <= 5".The implication machinery is needed to detect usability of partial indexes,and the refutation machinery is needed to implement constraint exclusion.This patch extends that machinery to make proofs for operator expressionsinvolving the same two immutable-but-not-necessarily-just-Const inputexpressions, ie does "expr1 op1 expr2" prove or refute "expr1 op2 expr2" or"expr2 op2 expr1"? An important example is that we can now prove "x = y"given "y = x", which formerly the code could not deduce unless x or y was aconstant. We can make use of the system's knowledge of operator commutatorand negator pairs, and can also make use of btree opclass relationships,for example "x < y" implies "x <= y" and refutes "x > y" (notice thatneither of these could be proven just from commutator or negator links).Inspired by a gripe from Brian Dunavant. This seems more like a newfeature than a bug fix, though, so no back-patch.
1 parentc81e63d commit3f8c23c

File tree

1 file changed

+358
-159
lines changed

1 file changed

+358
-159
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp