pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: create function (plpgsql): permission denied
5+ messages / 3 participants
[nested] [flat]
* Re: create function (plpgsql): permission denied
@ 2003-04-07 12:15 Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 12:53 ` Re: create function (plpgsql): permission denied John Gunther <inbox@bucksvsbytes.com>
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Salazar @ 2003-04-07 12:15 UTC (permalink / raw)
To: pgsql-admin
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.
--
PS
pedro-b-salazar@ptinovacao.pt
PGP:0E129E31D803BC61
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: create function (plpgsql): permission denied
2003-04-07 12:15 Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
@ 2003-04-07 12:53 ` John Gunther <inbox@bucksvsbytes.com>
2003-04-07 14:30 ` Re: create function (plpgsql): permission denied Tom Lane <tgl@sss.pgh.pa.us>
2003-04-07 14:38 ` Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
0 siblings, 2 replies; 5+ messages in thread
From: John Gunther @ 2003-04-07 12:53 UTC (permalink / raw)
To: ; +Cc: 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.
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: create function (plpgsql): permission denied
2003-04-07 12:15 Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 12:53 ` Re: create function (plpgsql): permission denied John Gunther <inbox@bucksvsbytes.com>
@ 2003-04-07 14:30 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 5+ messages in thread
From: Tom Lane @ 2003-04-07 14:30 UTC (permalink / raw)
To: John Gunther <inbox@bucksvsbytes.com>; +Cc: pgsql-admin
John Gunther <inbox@bucksvsbytes.com> writes:
> This will grant <desireduser> the usage of plpgsql even if it is untrusted.
No. Untrusted languages can be used only by superusers, period. USAGE
is for controlling non-superusers' access to trusted languages.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: create function (plpgsql): permission denied
2003-04-07 12:15 Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 12:53 ` Re: create function (plpgsql): permission denied John Gunther <inbox@bucksvsbytes.com>
@ 2003-04-07 14:38 ` Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 16:45 ` Re: create function (plpgsql): permission denied John Gunther <inbox@bucksvsbytes.com>
1 sibling, 1 reply; 5+ messages in thread
From: Pedro Salazar @ 2003-04-07 14:38 UTC (permalink / raw)
To: John Gunther <inbox@bucksvsbytes.com>; +Cc: pgsql-admin
Hi John,
when I make grant usage on language 'plpgsql' to my user, I get this
error:
ERROR: language "plpgsql" is not trusted
So, if I must trust my language, I won't need the grant usage of
language to my user, will I?
BTW, if my user is already the owner of schema, is really need the grant
all on schema to my user?
thanks,
Pedro Salazar.
On Mon, 2003-04-07 at 13:53, John Gunther wrote:
> 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.
--
PS
pedro-b-salazar@ptinovacao.pt
PGP:0E129E31D803BC61
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: create function (plpgsql): permission denied
2003-04-07 12:15 Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 12:53 ` Re: create function (plpgsql): permission denied John Gunther <inbox@bucksvsbytes.com>
2003-04-07 14:38 ` Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
@ 2003-04-07 16:45 ` John Gunther <inbox@bucksvsbytes.com>
0 siblings, 0 replies; 5+ messages in thread
From: John Gunther @ 2003-04-07 16:45 UTC (permalink / raw)
To: Pedro Salazar <pedro-b-salazar@ptinovacao.pt>; +Cc: pgsql-admin
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
<br>
<br>
<blockquote type="cite"
cite="mid1049726289.1132.38.camel@vitoria.intra.cet.pt">
<pre wrap="">when I make grant usage on language 'plpgsql' to my user, I get this
error:
ERROR: language "plpgsql" is not trusted, if I must trust my language, I won't need the grant usage of
language to my user, will I?</pre>
</blockquote>
Yes, I miswrote that sentence. The language must be trusted for any
non-superuser to ever use it. Just because the language is trusted,
though, should not automatically allow users access to it without a
GRANT. The fact that they do not need GRANTing, though, is either a bug
or a documentation error.<br>
<blockquote type="cite"
cite="mid1049726289.1132.38.camel@vitoria.intra.cet.pt">
<pre wrap="">
So
BTW, if my user is already the owner of schema, is really need the grant
all on schema to my user?</pre>
</blockquote>
You're correct. I was allowing for <desireduser> to not be the
schema owner<br>
<blockquote type="cite"
cite="mid1049726289.1132.38.camel@vitoria.intra.cet.pt">
<pre wrap="">
thanks,
Pedro Salazar.
On Mon, 2003-04-07 at 13:53, John Gunther wrote:
</pre>
</blockquote>
<blockquote type="cite"
cite="mid1049726289.1132.38.camel@vitoria.intra.cet.pt">
<blockquote type="cite">
<pre wrap=""> 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.
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-04-07 16:45 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-07 12:15 Re: create function (plpgsql): permission denied Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 12:53 ` John Gunther <inbox@bucksvsbytes.com>
2003-04-07 14:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-07 14:38 ` Pedro Salazar <pedro-b-salazar@ptinovacao.pt>
2003-04-07 16:45 ` John Gunther <inbox@bucksvsbytes.com>
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