diff --git a/src/query.c b/src/query.c index d5bd922..4284184 100644 --- a/src/query.c +++ b/src/query.c @@ -514,7 +514,7 @@ void extractClauseFromBooleanTest(Relids base_relids, BooleanTest *node, List ** break; case IS_NOT_FALSE: opname = "IS NOT"; - val = (Expr *) makeConst(BOOLOID, -1, InvalidOid, sizeof(bool), BoolGetDatum(true), false, true); + val = (Expr *) makeConst(BOOLOID, -1, InvalidOid, sizeof(bool), BoolGetDatum(false), false, true); break; case IS_UNKNOWN: opname = "IS"; diff --git a/test-3.9/expected/multicorn_regression_test.out b/test-3.9/expected/multicorn_regression_test.out index f60a99a..67ec0cd 100644 --- a/test-3.9/expected/multicorn_regression_test.out +++ b/test-3.9/expected/multicorn_regression_test.out @@ -519,6 +519,20 @@ NOTICE: ['test1', 'test2', 'test3'] -------+-------+------- (0 rows) +select * from testmulticorn where test1 IS NOT TRUE; +NOTICE: [test1 IS NOT t] +NOTICE: ['test1', 'test2', 'test3'] + test1 | test2 | test3 +-------+-------+------- +(0 rows) + +select * from testmulticorn where test1 IS NOT FALSE; +NOTICE: [test1 IS NOT f] +NOTICE: ['test1', 'test2', 'test3'] + test1 | test2 | test3 +-------+-------+------- +(0 rows) + select * from testmulticorn where test1 IS UNKNOWN; NOTICE: [test1 IS None] NOTICE: ['test1', 'test2', 'test3'] diff --git a/test-3.9/sql/multicorn_regression_test.sql b/test-3.9/sql/multicorn_regression_test.sql index 18d3f5b..e7bfb81 100644 --- a/test-3.9/sql/multicorn_regression_test.sql +++ b/test-3.9/sql/multicorn_regression_test.sql @@ -115,6 +115,8 @@ select * from testmulticorn where test1 = TRUE; select * from testmulticorn where test1 = FALSE; select * from testmulticorn where test1 IS TRUE; select * from testmulticorn where test1 IS FALSE; +select * from testmulticorn where test1 IS NOT TRUE; +select * from testmulticorn where test1 IS NOT FALSE; select * from testmulticorn where test1 IS UNKNOWN; select * from testmulticorn where test1 IS NOT UNKNOWN;