postgres-language-server icon indicating copy to clipboard operation
postgres-language-server copied to clipboard

No autocompletion inside function bodies

Open Donnerstagnacht opened this issue 8 months ago • 3 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

No autocompletion options are suggested in functions.

To Reproduce

Create a function signature. Type a

Expected behavior

Autocompletion suggestions should appear in functions as in plain query statements.

Screenshots

System information

  • OS: windows 11
  • code editor: vs-code
  • pls: 0.5.0

Donnerstagnacht avatar Apr 19 '25 17:04 Donnerstagnacht

Thanks for reporting 👍🏻👍🏻👍🏻👍🏻

juleswritescode avatar Apr 22 '25 06:04 juleswritescode

With 0.6.0 I get auto completion suggestions in sql functions for schemas and if I have chosen a schema, also for tables.

But I do not get completion suggestions for columns and also not for tables after a 'FROM ' clause, e.g. I can not use the new feature that the schema is added automatically for non public tables if accepted from a completion.

Is that the expected behavior right now @juleswritescode ?

Donnerstagnacht avatar Apr 23 '25 15:04 Donnerstagnacht

Expected yes, since SQL function bodies are not fully supported yet. But desired – hell no :)

Will take a look into that in the next few days.

juleswritescode avatar Apr 24 '25 06:04 juleswritescode

@Donnerstagnacht Please let me know if this works as expected with the next release :)

juleswritescode avatar Jun 10 '25 16:06 juleswritescode

Works like a charm! Thank you @juleswritescode .

I made a feature request in #433. Would like to know what you think.

I also added two tickets regarding function types in #431 and #432. I was not sure if you consider that to be feature requests or bugs?

I also put a general question in #107. Do you think it would be possible - in the long run - to make the PLS feel a bit more like editing declarative code as we are used to it in typescript (even if the truth is in the database or in derived migrations)?

I think if that would be somehow possible it would offer a new level of DX and would also set apart this project from other options (like the webstorm database tools)

Donnerstagnacht avatar Jun 19 '25 11:06 Donnerstagnacht