i all. Looking for a way to change some functions to 'security
definer'. This is only going to happen in some of the schemas.I found
that pg_catalog.pg_proc have a bool column (prosecdef), which contains
if some function is defined as 'security definer'. So good. It also
contains a column named pronamespace, which contains (or should) the
schema.
After this
SELECT distinct pronamespace from pg_catalog.pg_proc;pronamespace
-------------- 11 2200 11313 1901391 1901393 1901396 1901397 1901398
1901399
i would say that, in pg_catalog.pg_namespace i should be able to found
the schema for a particular function. But nope:
glyms_f_test=# SELECT * from pg_catalog.pg_namespace ; nspname | nspowner | nspacl
--------------------+----------+-------------------------------------pg_catalog | 10 |
{postgres=UC/postgres,=U/postgres}pg_toast | 10 |pg_temp_1 | 10 |pg_toast_temp_1 |
10 |information_schema | 10 | {postgres=UC/postgres,=U/postgres}
[snip]public | 10 | {postgres=UC/postgres,=UC/postgres}
(15 rows)
Obviously im missing something, i cant find any relation between
pg_proc.pronamespace and pg_namespace.
Im using PG 8.3.5 (Also tested in 8.2.5 with same results)
Any hints?
Thanks!
Gerardo