-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Cannot query postgres when tables have complex names/case #23820
Comments
@ilsaloving Could you share the entire steps to reproduce the symbol issue? I can't reproduce it locally. CREATE TABLE postgresql.tpch.test AS SELECT 1 "my-column";
SELECT * FROM postgresql.tpch.test;
my-column
-----------
1
(1 row)
SELECT "my-column" FROM postgresql.tpch.test;
my-column
-----------
1
(1 row) |
Using dbeaver (because my trino connection is R/O), I connect to postgres From trino, I then do:
I tried with the columns: and that appeared to work. Or at least, Trino is doing some internal mapping between case-insensitive and case-sensitive:
So it looks like whatever Trino is doing with column names, also needs to be done with table names. |
I understand this is not a new issue. Please take a look at https://trino.io/docs/current/connector/postgresql.html#case-insensitive-matching & #17. |
Thank you. I have no idea how I missed that. |
This is related to issues #11042 and #20421.
Trino is forcing identifiers to lower case, and it doesn't handle identifiers with unusual symbols. (eg: -)
Normally these are fine if you wrap them in quotes (eg: SELECT "my-column" from "MyTable"), but it seems like trino strips those out as well.
The text was updated successfully, but these errors were encountered: