Skip to content

Commit df6abda

Browse files
aokijiNicolás De los Santos
andauthored
fix: add missing column in group by expression (#534)
when trying to use the lsp server autocompletion didnt work and when activating logs found messages such as: > ERROR pgt_lsp::session error=Database error: column "c.relkind" must appear in the GROUP BY clause or be used in an aggregate function upon adding c.relkind into the group by expression autocomplete started working as expected, the issue seems to be using c.relkind in the select statement without using it in the group by expression I'm using postgres 12 to test it --------- Co-authored-by: Nicolás De los Santos <nicolas.delossantos@meteologica.com>
1 parent a1f6a56 commit df6abda

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

.sqlx/query-66d92238c94b5f1c99fbf068a0b5cf4c296b594fe9e6cebbdc382acde73f4fb9.json renamed to .sqlx/query-aced4382cedbfc359bb1c1ab71cf2472fa8afc0b24bf02ee1bfdfdbf111acfc8.json

Lines changed: 3 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pgt_schema_cache/src/queries/tables.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ where
3535
group by
3636
c.oid,
3737
c.relname,
38+
c.relkind,
3839
c.relrowsecurity,
3940
c.relforcerowsecurity,
4041
c.relreplident,
41-
nc.nspname;
42+
nc.nspname;

0 commit comments

Comments
 (0)