Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect postgres schema in JdbcDatabaseMetadataImpl.tableNames #797

Closed
simolus3 opened this issue Feb 13, 2020 · 0 comments
Closed

Respect postgres schema in JdbcDatabaseMetadataImpl.tableNames #797

simolus3 opened this issue Feb 13, 2020 · 0 comments
Assignees

Comments

@simolus3
Copy link

In our development setup, we have different services connecting to the same postgres instance. Those services can have conflicting table names, so we want to use postgres schemas to separate them.

Unfortunately, Exposed will not create a table in the current schema if a table with the same name exists in another schema. I see that the tableNames getter returns all tables across all schemas by default:

return getTables(databaseName, oracleSchema, "%", arrayOf("TABLE")).iterate {
identifierManager.inProperCase(getString("TABLE_NAME"))
}

Since we're on postgres, oracleSchema returns null, which means that getTables will return all tables across all schemas. Is there a way to only respect the current schema in there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants