Exposed icon indicating copy to clipboard operation
Exposed copied to clipboard

Having dot symbols within table names produces incorrect SQL statements

Open gzukula opened this issue 4 years ago • 1 comments

In case a table name has a dot in it (e.g. "namespaceABC.some_entities") then the resulting SQL query won't surround the table name with the double quotes and the execution of this query will fail.

Then if one supplies the table name already being wrapped between the quotes: object SomeEntities : IntIdTable("\"namespaceABC.some_entities\"") { ... } the resulting SQL queries would still be incorrect, since the table name would be broken apart by query builder and translated as: "namespaceABC"."some_entities".

This problem can be observed by having and trying to access such tables in PostgreSQL.

gzukula avatar Dec 05 '20 12:12 gzukula

Is there any update or workaround on this? I have the same problem.

Gurkonier avatar Feb 26 '22 15:02 Gurkonier

Hey @gzukula @Gurkonier. What error do you get when the query fails for the first option (without adding the double quotes)? Just to confirm, are you creating a schema like this SchemaUtils.createSchema("namespaceABC") before creating the table with a dot in its name?

joc-a avatar Jul 31 '23 09:07 joc-a