diff options
| author | Tom Lane | 2002-08-23 16:41:38 +0000 |
|---|---|---|
| committer | Tom Lane | 2002-08-23 16:41:38 +0000 |
| commit | a2a3192802e12e056806d5921c3fc4a7a6df8b09 (patch) | |
| tree | e10ac75a39d8429235b9d994356ca27d62c81005 /src/test | |
| parent | cf7ee638a742474f92d40c0d6f1326bb8b06506e (diff) | |
Further cleanup around the edges of OPAQUE/pseudotype changes. Correct
the declarations of some index access method support functions. Support
SQL functions returning VOID.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/opr_sanity.out | 13 | ||||
| -rw-r--r-- | src/test/regress/sql/opr_sanity.sql | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out index efdc8c6a500..66a2b71cac5 100644 --- a/src/test/regress/expected/opr_sanity.out +++ b/src/test/regress/expected/opr_sanity.out @@ -187,6 +187,19 @@ WHERE p1.oid != p2.oid AND -------------+------------- (0 rows) +-- Look for functions that return type "internal" and do not have any +-- "internal" argument. Such a function would be a security hole since +-- it might be used to call an internal function from an SQL command. +-- As of 7.3 this query should find only internal_in. +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE p1.prorettype = 'internal'::regtype AND NOT + ('(' || oidvectortypes(p1.proargtypes) || ')') ~ '[^a-z0-9_]internal[^a-z0-9_]'; + oid | proname +------+------------- + 2304 | internal_in +(1 row) + -- **************** pg_cast **************** -- Look for casts from and to the same type. This is not harmful, but -- useless. diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql index d9be98a5fd3..531a5523e0a 100644 --- a/src/test/regress/sql/opr_sanity.sql +++ b/src/test/regress/sql/opr_sanity.sql @@ -148,6 +148,17 @@ WHERE p1.oid != p2.oid AND NOT p1.proisagg AND NOT p2.proisagg AND (p1.proargtypes[7] < p2.proargtypes[7]); +-- Look for functions that return type "internal" and do not have any +-- "internal" argument. Such a function would be a security hole since +-- it might be used to call an internal function from an SQL command. +-- As of 7.3 this query should find only internal_in. + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE p1.prorettype = 'internal'::regtype AND NOT + ('(' || oidvectortypes(p1.proargtypes) || ')') ~ '[^a-z0-9_]internal[^a-z0-9_]'; + + -- **************** pg_cast **************** -- Look for casts from and to the same type. This is not harmful, but |
