bugfix in sql query

reviewable/pr18780/r1
Pepe Barbe 12 years ago
parent 4a9a6c81ac
commit 3c239430e4

@ -33,7 +33,7 @@ def set_owner(cursor, db, owner):
return True
def db_owned_by(cursor, db, user):
query = """SELECT count(*) FROM pg_database JOIN pg_user ON datdba = usesysid
query = """SELECT * FROM pg_database JOIN pg_user ON datdba = usesysid
WHERE usename = %(user)s and datname = %(db)s"""
cursor.execute(query, {'db':db, 'user':user})
return cursor.rowcount == 1

Loading…
Cancel
Save