Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1C6EC634C60 for ; Fri, 11 Sep 2009 15:08:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 82104-01 for ; Fri, 11 Sep 2009 18:07:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by mail.postgresql.org (Postfix) with ESMTP id 41D6F6336A4 for ; Fri, 11 Sep 2009 15:07:57 -0300 (ADT) Received: from [157.92.155.58] (mailbis [157.92.155.58]) by mail.fmed.uba.ar (Postfix) with ESMTP id 50F2439C37A for ; Fri, 11 Sep 2009 15:06:55 -0300 (ART) Message-ID: <4AAA8F9A.2040903@fmed.uba.ar> Date: Fri, 11 Sep 2009 14:57:46 -0300 From: Gerardo Herzig User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: postgres list Subject: about pg_proc (column pronamespace) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.07 tagged_above=-10 required=5 tests=AWL=-1.530, BAYES_20=-0.74, SARE_BAYES_5x7=0.6, SARE_BAYES_6x7=0.6 X-Spam-Level: X-Archive-Number: 200909/47 X-Sequence-Number: 33112 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