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

Support case-sensitive identifier lookup in autocomplete and \d commands #282

Open
nineinchnick opened this issue Jul 25, 2021 · 1 comment

Comments

@nineinchnick
Copy link
Member

Right now, all lookups are case-sensitive. But it only should be done in this manner when the search pattern contains mixed case, and it should be case-insensitive otherwise (the default).

@jpalus
Copy link
Contributor

jpalus commented Jul 26, 2021

Note that for Oracle I suppose it should work differently. Consider two tables:

CREATE TABLE test1 (id int);
CREATE TABLE "test2" (id int);

Then

SELECT * FROM te<Tab>

should present only following completions:

test1

Same for mixed case:

SELECT * FROM TEs<Tab>

To get case sensitive completion one needs to use quoting:

SELECT * FROM "tes<Tab>

and completion candidates need to include quote:

"test2"

In other words all following SELECTs are valid for test1:

SELECT * FROM test1;
SELECT * FROM TEST1;
SELECT * FROM TeSt1;

but for test2 only one is valid:

SELECT * FROM "test2";

Not really sure what offers readline but for te<Tab> following completions could be presented:

test1
"test2"

but readline would need to be convinced that "test2" is completion for te* and insert quoting.

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

No branches or pull requests

2 participants