microsoft / vscode-postgresql

PostgreSQL extension for VSCODE
Other
396 stars 50 forks source link

Intellisense doesn't support Window statement #38

Open txomon opened 5 years ago

txomon commented 5 years ago

Steps to Reproduce: A simple query like:

select rank() over last_action_rank as "last_action_rank",
                   ua.id
from user_action ua
where ua.user_id is not null
    and ua.action in ('upvote',
                      'downvote')
window last_action_rank as (partition by ua.playback_id,
                                                                           ua.user_id
                                                              order by ts desc)

Get wrongly formatted, and window is not marked as a keyword: image

Check the docs for PSQL language definition: https://www.postgresql.org/docs/current/sql-select.html