Re: Problem granting access to a PlPython function - Mailing list pgsql-general

From Mariano Mara
Subject Re: Problem granting access to a PlPython function
Date
Msg-id 1257713339-sup-6202@kafka
Whole thread Raw
In response to Re: Problem granting access to a PlPython function  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
Excerpts from Sam Mason's message of Sun Nov 08 17:18:52 -0300 2009:
> On Sun, Nov 08, 2009 at 05:07:16PM -0300, Mariano Mara wrote:
> > I have this plpython function that I need to execute with a non
> > superuser. I logged in the postgres account, create it and grant execute
> > rights to the target user.
> > However I cannot execute it with this user: I'm getting a "function ...
> > does not exist" error and after poking it for a few hours without luck,
>
> It looks like you're creating it in a different database (and/or schema)
> from the one you're trying to access it from.  Functions are associated
> with exactly one schema and this schema will exist in exactly one
> database. Your search_path specifies the schema(s) to look in for
> tables/functions, you can change it by doing:
>
>   SET search_path = myschema;
>
> You need to be connected to the right database for this to work; "psql
> -l" gives you a list.  The command "\df" lists all (user defined)
> functions that you can currently see.
>
> Hope that helps point you in the right direction!
>

That was fast and it was right too. Seems I still need to master the
whole database/schema concept.

Thanks a lot Sam for your time and advice, I really appreciate it.

Mariano.

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Problem to use remote cygwin server using ssh and native psql 8.3.5
Next
From: Tim Uckun
Date:
Subject: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.