Fix collation for postgres for unit tests (#7359)
When running the UTs against a postgres deatbase, we need to set the collation correctly.pull/7361/head
parent
38919b521e
commit
fb8ff79efd
|
@ -0,0 +1 @@
|
|||
Fix collation for postgres for unit tests.
|
|
@ -74,7 +74,10 @@ def setupdb():
|
|||
db_conn.autocommit = True
|
||||
cur = db_conn.cursor()
|
||||
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
||||
cur.execute("CREATE DATABASE %s;" % (POSTGRES_BASE_DB,))
|
||||
cur.execute(
|
||||
"CREATE DATABASE %s ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' "
|
||||
"template=template0;" % (POSTGRES_BASE_DB,)
|
||||
)
|
||||
cur.close()
|
||||
db_conn.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue