beekeeper-studio
beekeeper-studio copied to clipboard
BUG: Code Completion doesn't autocomplete schemaname or schemaname.tablename
I am connected to my database which has roughly 1200 objects and about 20 schemas. The objects load and then are displayed on the left navigation window listing tables, functions etc.
I type out the following in the sql editor:
select * from schema.tablename;
While I am typing, my expectation is that as soon as I start typing "schema", I would be provided recommendations of schema. It does provide recommendations for table, but I do not like setting my search_path so I like code sql with the full declaration of schema.tablename. And after I type "schema." there are no tablename recommendations.
I like your app, but this is my main issue with postgres sql tools. Looks good and I will continue to follow your app.
Also, when I right click on a function in the navigation window and select SQL:Create, nothing happens where I would expect it to open the DDL in a tab.
SYSTEM : Ubuntu 20.04 BEEKEEPER : 3.0.7
Hi,
I have the same problem with DDL SLQ:Create command on gui - but I only have it when tables has capital letters - becouse as I understand psql is case-sensitive so if my table is "XXX_Something" DDL menu don't work, but if its "xxx_something" it generates code for creating table - maybe you have the same issue ?
cheers
I just checked and the function name is all lowercase and no sql is generated. We have all of our object lowercase. The table shows the ddl however the function does not.
I originally did not test the tables so it looks like that works fine, just the functions.
Thanks, have a great weekend
Hi, thx and hope you had great weekend too.
I've just checked as to creating simple function and it worked Ok...
Windows 10 : BS 3.0.11
@mefjak I don't think you're getting the issue here. Let's get as an example the postgres database. Inside it, we have two schemas: information_schema and pg_catalog.
When I start typing in to get auto-completion, this is what I get:
Which isn't correct in any means. Then it goes worse. Let's say I choose to use information_schema, which has those tables:
if I try to get into information_schema.sql_parts, there's no autocomplete whatsoever:
And this is detrimental to Postgres users, as they must use schema.
Hey everyone. Yes you are right, it doesn't autocomplete schema name at all right not. It is terrible UX. I definitely appreciate that.
I'm currently using a very naive autocomplete system. I'd hoped to build a full language model to solve these types of issues, but I've heard this complaint enough that I'll take a look to see what I can do.
Thanks for all the community engagement on the app! I'm a one-man part-timer, so please be patient, but I'll get these issues sorted out :-)
@rathboma I forked the code this weekend and found the hint solution for that, but didn't have much time to pry out much more info yet. Question (or let me know where should I talk about it on a discord or something): when I'm under TabQueryEditor.vue, is there a way to know the query I'm working on? I see how to put the schema rendering inside hintOptions() but I think it's best to build a content-aware recommendation based on it.
If you can point me out one this, that would be great, so I can try to work on that over this weekend and see if I can get some out of it to help out the project :)
@joaoprp thx for clearing that up.
Autocomplition is somewhat working :

And with schema it isn't - it sees all tables in all schemas but after writing manual schema it doesn't autocomplite as you can see - that moment where there is "select * from test." I am trying ctrl+space ;)

Just trying to provide some use cases ;)
IIRC (it's been a while) I think I worked around this by making the postgresql autocomplete use the schema always and making the builtin stuff lower priority https://github.com/beekeeper-studio/beekeeper-studio/pull/582/files
Is there a PR for this and do you need help with this? @rathboma