comparison shelltools/query-pr/query.py @ 55:40f64a96481f

Adjust database user arrangements and grant schema privs.
author David A. Holland
date Sun, 10 Apr 2022 19:36:29 -0400
parents c0be30249ffe
children 42d7888272a0
comparison
equal deleted inserted replaced
54:36d91dfe017f 55:40f64a96481f
237 ############################################################ 237 ############################################################
238 # database 238 # database
239 239
240 dblink = None 240 dblink = None
241 241
242 def opendb(): 242 def opendb(paranoid):
243 global dblink 243 global dblink
244 244
245 host = "localhost" 245 host = "localhost"
246 user = "swallowtail" 246 user = "swallowtail_public" if paranoid else "swallowtail_reader"
247 database = "swallowtail" 247 database = "swallowtail"
248 dblink = psycopg2.connect("host=%s user=%s dbname=%s" % 248 dblink = psycopg2.connect("host=%s user=%s dbname=%s" %
249 (host, user, database)) 249 (host, user, database))
250 # end opendb 250 # end opendb
251 251