As postgres user, I have create extension plpython3u;
in my database
then I have set the plpython3u
to trusted: select lanpltrusted from pg_language where lanname like 'plpython3u';
returns true
but when my db_user tries
create function check_data_valid(id bigint)
returns boolean
as $$
-- ...
return true
$$ language plpython3u;
I got the error: permission denied for the language plpython3u
So, with my postgres user then I have tried: grant usage on plpython3u to db_user
and grant execute on plpython3u to db_user
but both returns the error:
relation python doesn't exist
maybe it's because it's an extension... however, I don't what to do so as to create my stored procedure.
plpython3u
you might as well just make them a superuser anyway; they can fairly easily make themselves a superuser from within a Python script. (This isn't a good reason to make them a superuser, it's a good reason not to useplpython3u
for user-written procedures). – Craig Ringer Mar 22 at 12:25GRANT
you're looking for isGRANT USAGE ON LANGUAGE plpython3u TO db_user
. – Milen A. Radev Mar 22 at 12:54