You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def has_table(self, connection, table_name, schema=None):
# seems like case gets folded in pg_class...
if schema is None:
cursor = connection.execute(
sql.text(
"select relname from pg_class c join pg_namespace n on "
"n.oid=c.relnamespace where n.nspname=current_schema() and "
"lower(relname)=:name",
bindparams=[ sql.bindparam('name', unicode(**table_name.lower()**),
type_=sqltypes.Unicode)](
)
)
)
This results in a failure when trying to work with a table named FOO when a table named foo is already in the database. Postgres at least allows both versions to coexist.
The text was updated successfully, but these errors were encountered:
its not immediately clear if that's going to break things for folks who are relying upon it. Have you run the full test suite against PG to ensure everything continues passing ?
There was the assumption of lower() throughout that code including for sequences - that code was all contributed some years ago. Test coverage has been added along with removal of all lower() directives in 8438477 thanks for the patch !
Migrated issue, originally created by Anonymous
Just caught this little bugger:
)
)
)
This results in a failure when trying to work with a table named FOO when a table named foo is already in the database. Postgres at least allows both versions to coexist.
The text was updated successfully, but these errors were encountered: