Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SQL functions: Auto suggestions for sql function input parameters as query operators/comparisions #433

Donnerstagnacht started this conversation in Ideas
Discussion options

Feature

I would love it if the PLS language server could suggest input parameters as operators in sql functions. The main usage would be where clauses.

Right now, the PLS detects the usage of incorrect named input parameters. That's why I believe it should be possible to suggest comparison operators in where clauses.

Example

create function test_auto_suggesstions_in_where_comparison(user_id uuid) returns users_hidden.users language sql as
$$
select * from users_hidden.users u where u.id = user_id;
$$;

Here I have a working sql function. I would like to find a user with a given user_id handed in as input. I think it would be nice if the PLS could suggest the input after the = as <space><input_parameter_name> and if possible, indicate, the type in the dropdown menu, too (similar DX as in select).

Current behavior:

image

Prefered behaviour as for select:

image

Alternatives

Typing it yourself. Possible but worse DX experience.

Relevance

Low. More a quality-of-life improvement but probably not that hard to implement. What do you think @juleswritescode ?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /