summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNeil Conway2005-12-11 10:54:28 +0000
committerNeil Conway2005-12-11 10:54:28 +0000
commitbe8100d64ec93ccd8160b37379ba189aab4d0ef1 (patch)
tree086253fdb7dba257cc20ee93aeca538244240875 /src/test
parentc10593149a2cdcb6376bbee2947ba7fd59cc4ffb (diff)
Implement IS NOT DISTINCT FROM, update the regression tests and docs.
Patch from Pavel Stehule, minor fixups by myself.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/select_distinct.out25
-rw-r--r--src/test/regress/sql/select_distinct.sql6
2 files changed, 31 insertions, 0 deletions
diff --git a/src/test/regress/expected/select_distinct.out b/src/test/regress/expected/select_distinct.out
index 019638ed176..abe34ae7ae5 100644
--- a/src/test/regress/expected/select_distinct.out
+++ b/src/test/regress/expected/select_distinct.out
@@ -195,3 +195,28 @@ SELECT null IS DISTINCT FROM null as "no";
f
(1 row)
+-- ANSI SQL 2003 form
+SELECT 1 IS NOT DISTINCT FROM 2 as "no";
+ no
+----
+ f
+(1 row)
+
+SELECT 2 IS NOT DISTINCT FROM 2 as "yes";
+ yes
+-----
+ t
+(1 row)
+
+SELECT 2 IS NOT DISTINCT FROM null as "no";
+ no
+----
+ f
+(1 row)
+
+SELECT null IS NOT DISTINCT FROM null as "yes";
+ yes
+-----
+ t
+(1 row)
+
diff --git a/src/test/regress/sql/select_distinct.sql b/src/test/regress/sql/select_distinct.sql
index 94032c312ee..c4a63aaf16f 100644
--- a/src/test/regress/sql/select_distinct.sql
+++ b/src/test/regress/sql/select_distinct.sql
@@ -56,3 +56,9 @@ SELECT 1 IS DISTINCT FROM 2 as "yes";
SELECT 2 IS DISTINCT FROM 2 as "no";
SELECT 2 IS DISTINCT FROM null as "yes";
SELECT null IS DISTINCT FROM null as "no";
+
+-- ANSI SQL 2003 form
+SELECT 1 IS NOT DISTINCT FROM 2 as "no";
+SELECT 2 IS NOT DISTINCT FROM 2 as "yes";
+SELECT 2 IS NOT DISTINCT FROM null as "no";
+SELECT null IS NOT DISTINCT FROM null as "yes";