I would like to have autocompletion for * to add in all column names if the table can be uniquely identified: (e.g. in select and update/insert with returning clause)
select
*
from
food;
should expand to
select
id,
column_a,
column_b,
from
food;
where id, column_a and column_b are all columns of the table food.
this would simplify capturing the current db schema state of a table into a sql query file. later schema changes wouldn't break any queries or lead to unnecessary data transmission.
right now I need to enumerate all columns manually.
I would also be fine if a custom id/character to trigger where used to trigger this completion or to make it optional, so that is doesn't collide with the standard * usage.
thanks for you work on this urgently needed work in the ecosystem of LSPs and Postgres!
Tobias Hänel requests a feature for autocompletion of all column names when using '' in SQL queries. This would simplify capturing the current database schema and prevent issues with schema changes. He suggests making this feature optional to avoid conflicts with standard '' usage.