mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add quotes around postgresql database name
This commit is contained in:
@@ -124,7 +124,7 @@ def db_create(cursor, db, owner, template, encoding):
|
|||||||
template = " TEMPLATE \"%s\"" % template
|
template = " TEMPLATE \"%s\"" % template
|
||||||
if encoding:
|
if encoding:
|
||||||
encoding = " ENCODING '%s'" % encoding
|
encoding = " ENCODING '%s'" % encoding
|
||||||
query = "CREATE DATABASE %s%s%s%s" % (db, owner, template, encoding)
|
query = "CREATE DATABASE \"%s\"%s%s%s" % (db, owner, template, encoding)
|
||||||
cursor.execute(query)
|
cursor.execute(query)
|
||||||
return True
|
return True
|
||||||
elif owner and not db_owned_by(cursor, db, owner):
|
elif owner and not db_owned_by(cursor, db, owner):
|
||||||
|
|||||||
Reference in New Issue
Block a user