]> granicus.if.org Git - postgresql/commitdiff
Correct type_sanity test so it doesn't spit up on new
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 9 May 1999 23:43:25 +0000 (23:43 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 9 May 1999 23:43:25 +0000 (23:43 +0000)
definition of numeric_in.

src/test/regress/expected/type_sanity.out
src/test/regress/sql/type_sanity.sql

index 25aee300bf219b8298f8b928fe598b997398b47f..e45bb928ff9ab77c3ba66ff7d935b3727c3a731c 100644 (file)
@@ -40,7 +40,7 @@ QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
 FROM pg_type AS p1, pg_proc AS p2
 WHERE p1.typinput = p2.oid AND p1.typtype = 'b' AND
     (p2.pronargs != 1 OR p2.proretset) AND
-    (p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
+    (p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
 oid|typname|oid|proname
 ---+-------+---+-------
 (0 rows)
@@ -58,7 +58,7 @@ QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
 FROM pg_type AS p1, pg_proc AS p2
 WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
     (p2.pronargs != 1 OR p2.proretset) AND
-    (p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
+    (p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
 oid|typname|oid|proname
 ---+-------+---+-------
 (0 rows)
@@ -74,7 +74,8 @@ oid|typname|oid|proname
 
 QUERY: SELECT p1.oid, p1.relname
 FROM pg_class as p1
-WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND p1.relkind != 's');
+WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
+       p1.relkind != 's' AND p1.relkind != 'S');
 oid|relname
 ---+-------
 (0 rows)
index 3250600714e5ed89a5c2aa30fb692520e8c834c8..a6635fe779f174f1c34caa878e6175643e603a44 100644 (file)
@@ -49,8 +49,6 @@ WHERE p1.typtype != 'c' AND
      p1.typreceive = 0 OR p1.typsend = 0);
 
 -- Check for bogus typinput routines
--- The first OR subclause detects bogus non-array cases,
--- the second one detects bogus array cases.
 -- FIXME: ought to check prorettype, but there are special cases that make it
 -- hard: prorettype might be binary-compatible with the type but not the same,
 -- and for array types array_in's result has nothing to do with anything.
@@ -59,7 +57,7 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
 FROM pg_type AS p1, pg_proc AS p2
 WHERE p1.typinput = p2.oid AND p1.typtype = 'b' AND
     (p2.pronargs != 1 OR p2.proretset) AND
-    (p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
+    (p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
 
 -- Check for bogus typoutput routines
 -- The first OR subclause detects bogus non-array cases,
@@ -73,8 +71,6 @@ WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND
     (p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
 
 -- Check for bogus typreceive routines
--- The first OR subclause detects bogus non-array cases,
--- the second one detects bogus array cases.
 -- FIXME: ought to check prorettype, but there are special cases that make it
 -- hard: prorettype might be binary-compatible with the type but not the same,
 -- and for array types array_in's result has nothing to do with anything.
@@ -83,7 +79,7 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
 FROM pg_type AS p1, pg_proc AS p2
 WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
     (p2.pronargs != 1 OR p2.proretset) AND
-    (p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
+    (p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
 
 -- Check for bogus typsend routines
 -- The first OR subclause detects bogus non-array cases,
@@ -102,7 +98,8 @@ WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
 
 SELECT p1.oid, p1.relname
 FROM pg_class as p1
-WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND p1.relkind != 's');
+WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
+       p1.relkind != 's' AND p1.relkind != 'S');
 
 -- Indexes should have an access method, others not.