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
It seems like sqls has trouble with code completions and hover when dealing with a table outside of the public schema in Postgres. Both actions work fine for me for tables in the public schema, but return no results for tables in other schemas.
To Reproduce
Create a table in the default public schema, and one in another schema:
CREATETABLEcat (
age integer,
owner_name varchar(40)
);
CREATESCHEMAmy_schema;
CREATETABLEmy_schema.owner (
age integer,
name varchar(40)
);
Write a query involving the two tables and experiment with completion on each table through sqls:
SELECTcat.ageAS cat_age,
owner.ageAS owner_age
FROM
cat
JOINmy_schema.ownerAS owner
ONcat.owner_name=owner.name;
In particular, try to complete from owner. or my_schema.owner.. Also try to perform a hover action over owner.
Expected behavior
I would expect completion to work on both the cat and owner tables. Instead, it only works on cat. This is true regardless of whether the full my_schema.owner. prefix is used or the owner alias. Similarly, I would expect textDocument/hover to work for both cat and owner, but it only works for cat.
Versions (please complete the following information):
OS Version: Linux 5.17.1
sqls Version: 0.2.22
The text was updated successfully, but these errors were encountered:
I've hit the same issue. I just started using sqls and was trying to get completions on some pg_catalog.* tables and they didn't work. Luckily the gifs in the README convinced me to keep trying and see that completions actually work fine in the public schema.
tries to add some support for completion when working with other
schemas.
join snippets are not supported yet as foreign key information
gathered for the other schemas is not updated in the cache as it is
done with the column description
this partially solves issue sqls-server#99
Describe the bug
It seems like sqls has trouble with code completions and hover when dealing with a table outside of the
public
schema in Postgres. Both actions work fine for me for tables in thepublic
schema, but return no results for tables in other schemas.To Reproduce
Create a table in the default
public
schema, and one in another schema:Write a query involving the two tables and experiment with completion on each table through sqls:
In particular, try to complete from
owner.
ormy_schema.owner.
. Also try to perform a hover action overowner
.Expected behavior
I would expect completion to work on both the
cat
andowner
tables. Instead, it only works oncat
. This is true regardless of whether the fullmy_schema.owner.
prefix is used or theowner
alias. Similarly, I would expecttextDocument/hover
to work for bothcat
andowner
, but it only works forcat
.Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: