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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user