Python reading database postgres

Asked

Viewed 69 times

0

In python I use callproc to perform a function done in the postgres database. It works well if you access the bank by the user with full permission. But error occurs when accessing with private user and indicates reading error of psycopg2, in the excerpt with postgis st_transform(), st_distance(), st_setsrid(). Thank you who tell me which permissions are required for private user. to run these instructions.

1 answer

0

When creating the function:

CREATE FUNCTION

default is the option SECURITY INVOKER which specifies that the function will be executed with the privileges of the user who called the function. If you want the function to run with the privileges of the user who created the function then use SECURITY DEFINER.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.