supabase-community/postgres-language-server

Tables and columns names should autocomplete when in quote

Closed this issue · 5 comments

Bug report

When writing a SQL query:

SELECT table_name

Pressing CTRL + Space in VSCode, after SELECT, successfully auto-complete with the available tables, however, if I open with quote like that: SELECT ", it doesn't autocomplete, but it should work the same.

Thanks for reporting :) I'll look into that!

For the future, would you mind reporting such things in the postgres-language-server repo? This repo just serves as an "adapter" between the server and VSCode, and the server handles autocompletions etc.

Hope you have nice day 👍🏻

@juleswritescode Thanks for your reply! Should this issue moved to postgres-language-server repo?

Any news, if this is simple or complicated to fix?

Hey there, jep, I moved the issue!

Last time I checked, this seemed like a very hard bug 🥹
The issue is that the postgres parser basically crumbles if you have unterminated strings.

Maybe we can work around that using tree-sitter, I'll give it another shot in a couple of days.

@juleswritescode this shouldnt be an issue anymore with the custom lexer! maybe its already fixed now. if not, it should be an easy one.

will be fixed with the next release! many PRs are open.