Answer the question
In order to leave comments, you need to log in
Why is the permissions request not being fulfilled?
Executing a script with psycopg2 connected
import psycopg2
self.conn = psycopg2.connect(_conn_string)
self.cursor = self.conn.cursor()
self.cursor.execute('GRANT SELECT, INSERT ON TABLE log_fields TO manager;')
Answer the question
In order to leave comments, you need to log in
You can find out the details of the error, for example, like this:
try:
self.cursor.execute('GRANT SELECT, INSERT ON TABLE log_fields TO manager;')
except psycopg2.Error as e:
print(e.pgerror)
print(e.diag.message_primary)
print(psycopg2.errorcodes.lookup(e.pgcode))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question