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;')
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))