-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Same Table / View names, different Databases, Collision Problem #497
Comments
@MichalisDBA @thadguidry The schema thing was removed to enable joining across tables in a different schema. A restriction can be added if a schema is specified explicitly then only tables in that schema would be considered. |
Sure, and later we'll just need to mention in Docs that schema restriction mechanism is not a replacement for good security practices with user account management in a DB and that our schema restriction config is only provided as a convenience option |
So @kdhrubo will this solve the problem? Will be there a way to query both tables that have the same name but they are in different schemas? |
This should solve the problem.
Then two different tables can be queried.
Joins are using |
@MichalisDBA this will work hope to make a release with these changes in a week. |
Closing this ticket with reference to the documentation/web project |
To be available in release 0.3.1 |
Hello. Can confirm that now it is working. With Please mention it in the docs. |
Hello.
There is a problem when you start db2rest and the user account has access to multiple databases and these databases have tables or views that have same names.
For example. We have in a MySQL server 2 databases.
DB1
andDB2
.Both these databases have a table named
users
.So the schema looks like this
DB1.users
andDB2.users
When you start db2rest with a user account that has access to these 2 databases, only the latest table name that is fetched is cached. In this example only
DB2.users
will be available inhttp://localhost:8080/users
endpointI believe the API endpoint must change as @kdhrubo said to something like
/db/schema_catalog/table
The text was updated successfully, but these errors were encountered: