1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-07 12:02:30 +03:00

Further cleanup around the edges of OPAQUE/pseudotype changes. Correct

the declarations of some index access method support functions.  Support
SQL functions returning VOID.
This commit is contained in:
Tom Lane
2002-08-23 16:41:38 +00:00
parent cf7ee638a7
commit a2a3192802
7 changed files with 140 additions and 113 deletions

View File

@@ -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.

View File

@@ -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