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.Dismiss alert
{{ message }}
Repository navigation
SQLSpecialColumns not working as expected in the shared standalone #92
I am still receiving zero rows upon running SQLSpecialColumns in the given test case in the shared standalone.
Can you please run the test case in the standalone SQLSpecialColumns.zip and confirm if this is working for you?
Test case
CREATE TABLE test_special( id integer, ival integer);
CREATE UNIQUE index test_special_id on public.test_special(id);
CREATE UNIQUE index test_special_ui on public.test_special(ival);
I have tested this. I am not getting the column name but the schema name in the result set. We are binding the result set to the second column in the query. Isn't that supposed to be column name according to the ODBC standard?
I tested the fix. It is working in cases when there is only one unique index on the table. However, if there are two(multiple) unique indexes on the table, we are getting columns from both the indexes in the result which is not the correct behaviour according to my understanding.
We should ideally only get columns from one index in the result. Can you please check this case? Below is the use case for reference
Activity
davecramer commentedon Feb 21, 2025
Yes, can confirm that it does not work. I'm at odds as the test case does work. Looking into it.
Dave
abhi-555 commentedon Mar 11, 2025
Can you please provide any updates on this?
davecramer commentedon Mar 11, 2025
Hi,
I'm stuck trying to debug this. It works fine in the test cases for ODBC, however in a standalone program it doesn't.
I'm still working on it.
davecramer commentedon Mar 12, 2025
@abhi-555 I just merged a PR that should fix this. Please let me know
abhi-555 commentedon Apr 14, 2025
I have tested this. I am not getting the column name but the schema name in the result set. We are binding the result set to the second column in the query. Isn't that supposed to be column name according to the ODBC standard?
davecramer commentedon Apr 15, 2025
you are correct, sorry about that. I'll try to get something out in the next few days
davecramer commentedon Apr 16, 2025
OK just merged in #109 which should fix this.
abhi-555 commentedon May 20, 2025
I tested the fix. It is working in cases when there is only one unique index on the table. However, if there are two(multiple) unique indexes on the table, we are getting columns from both the indexes in the result which is not the correct behaviour according to my understanding.
We should ideally only get columns from one index in the result. Can you please check this case? Below is the use case for reference
CREATE TABLE public.users (
id integer
username VARCHAR(40),
email VARCHAR(50),
);
CREATE UNIQUE INDEX idx_users1 ON public.users(username);
CREATE UNIQUE INDEX idx_users2 ON public.users(email);
davecramer commentedon May 20, 2025
Just read the docs, and you are correct. I will have a look shortly
davecramer commentedon Jun 12, 2025
I have committed code that should resolve this issue. Please let me know.