pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedabout pg_proc (column pronamespace)
3+ messages / 2 participants
[nested] [flat]
* about pg_proc (column pronamespace)
@ 2009-09-11 17:57 Gerardo Herzig <gherzig@fmed.uba.ar>
0 siblings, 1 reply; 3+ messages in thread
From: Gerardo Herzig @ 2009-09-11 17:57 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: about pg_proc (column pronamespace)
@ 2009-09-11 18:12 Tom Lane <tgl@sss.pgh.pa.us>
parent: Gerardo Herzig <gherzig@fmed.uba.ar>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2009-09-11 18:12 UTC (permalink / raw)
To: Gerardo Herzig <gherzig@fmed.uba.ar>; +Cc: pgsql-sql
Gerardo Herzig <gherzig@fmed.uba.ar> writes:
> Obviously im missing something, i cant find any relation between
> pg_proc.pronamespace and pg_namespace.
You didn't look at pg_namespace.oid, which is a "system column"
meaning SELECT * doesn't show it.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: about pg_proc (column pronamespace)
@ 2009-09-11 18:14 Gerardo Herzig <gherzig@fmed.uba.ar>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Gerardo Herzig @ 2009-09-11 18:14 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
Tom Lane wrote:
> Gerardo Herzig <gherzig@fmed.uba.ar> writes:
>> Obviously im missing something, i cant find any relation between
>> pg_proc.pronamespace and pg_namespace.
>
> You didn't look at pg_namespace.oid, which is a "system column"
> meaning SELECT * doesn't show it.
>
> regards, tom lane
>
>
Oh, yeah. A little surprised, but yes there it is!
Thanks Tom.
Gerardo
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2009-09-11 18:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 17:57 about pg_proc (column pronamespace) Gerardo Herzig <gherzig@fmed.uba.ar>
2009-09-11 18:12 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-09-11 18:14 ` Gerardo Herzig <gherzig@fmed.uba.ar>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox