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.
The test PostgreSQLMigrationMediumTest.view(), used to test quoted table names, fail when try to cleanup the schema. I using the PostgreSQL 9.4.4.
The cause of error is the query used to get all table names. See the line 268 of PostgreSQLSchema:
"SELECT t.table_name FROM information_schema.tables t" +
//in this schema
" WHERE table_schema=?" +
//that are real tables (as opposed to views)
" AND table_type='BASE TABLE'" +
//and are not child tables (= do not inherit from another table).
" AND NOT (SELECT EXISTS (SELECT inhrelid FROM pg_catalog.pg_inherits" +
" WHERE inhrelid = ('\"'||t.table_schema||'\".\"'||t.table_name||'\"')::regclass::oid))" <== erro is here
Instead of
" WHERE inhrelid = ('\"'||t.table_schema||'\".\"'||t.table_name||'\"')::regclass::oid))" <== erro is here
Using the quot_ident function fix the problem, as showed bellow:
" WHERE inhrelid = (quote_ident(t.table_schema)||'.'||quote_ident(t.table_name))::regclass::oid))"
Note: Seem that the function quot_ident exists since PostgreSQL 7.3.
Thanks,
Fabio.
The text was updated successfully, but these errors were encountered:
The test PostgreSQLMigrationMediumTest.view(), used to test quoted table names, fail when try to cleanup the schema. I using the PostgreSQL 9.4.4.
The cause of error is the query used to get all table names. See the line 268 of PostgreSQLSchema:
Instead of
Using the quot_ident function fix the problem, as showed bellow:
Note: Seem that the function quot_ident exists since PostgreSQL 7.3.
Thanks,
Fabio.
The text was updated successfully, but these errors were encountered: