Re: create function (plpgsql): permission denied

From: John Gunther <inbox(at)bucksvsbytes(dot)com>
To:
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: create function (plpgsql): permission denied
Date: 2003-04-07 12:53:33
Message-ID: 3E9174CD.7000306@bucksvsbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

From psql <databasename> -U<databaseowner>, issue:
GRANT USAGE ON LANGUAGE plpgsql to <desireduser>;
You may also need (to allow creation of the function)
GRANT ALL ON SCHEMA <schemaname> TO <desireduser>;

This will grant <desireduser> the usage of plpgsql even if it is untrusted.

For attribute explanations, see
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=catalog-pg-language.htm

John Gunther
Bucks vs Bytes Inc

Pedro Salazar wrote:

>Greetings,
>
>On Mon, 2003-04-07 at 12:39, Pedro Salazar wrote:
>
>
>>select * from pg_language ;
>>lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator | lanacl
>>----------+---------+--------------+---------------+--------------+--------
>> plpgsql | t | f | 20893 | 0 |
>>
>>
>
>I updated the 'lanpltrusted' attribute to true, and now I can create
>functions.
>
>But, is it possible that only a group or a specified list of users have
>permission to create plpgsql functions instead trust the language for
>all users?
>
>thanks,
>Pedro Salazar.
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-04-07 14:30:06 Re: create function (plpgsql): permission denied
Previous Message Pedro Salazar 2003-04-07 12:15:43 Re: create function (plpgsql): permission denied