pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerardo Herzig <gherzig@fmed.uba.ar>
To: postgres list <pgsql-sql@postgresql.org>
Subject: about pg_proc (column pronamespace)
Date: Fri, 11 Sep 2009 14:57:46 -0300
Message-ID: <4AAA8F9A.2040903@fmed.uba.ar> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <4AAA8F9A.2040903@fmed.uba.ar>
Permalink:  ../4AAA8F9A.2040903@fmed.uba.ar/
Also on:    postgresql.org/message-id/4AAA8F9A.2040903@fmed.uba.ar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gherzig@fmed.uba.ar
  Subject: Re: about pg_proc (column pronamespace)
  In-Reply-To: <4AAA8F9A.2040903@fmed.uba.ar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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