Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Sep 17, 2024
1 parent d5656e7 commit c2701f7
Show file tree
Hide file tree
Showing 2 changed files with 300 additions and 397 deletions.
4 changes: 2 additions & 2 deletions pkg/clientinteractor/interactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ func (pi *PSQLInteractor) BackendConnections(_ context.Context, shs []shard.Shar
switch gb := stmt.GroupBy.(type) {
case spqrparser.GroupBy:
return groupBy(headers, shs, getters, gb.Col.ColName, pi)
case spqrparser.WhereClauseEmpty:
case spqrparser.GroupByClauseEmpty:
if err := pi.WriteHeader(headers...); err != nil {
spqrlog.Zero.Error().Err(err).Msg("")
return err
Expand Down Expand Up @@ -1469,7 +1469,7 @@ func groupBy[T any](headers []string, values []T, getters []func(s T) string, gr
for i, header := range headers {
if header == groupByCol {
if err := pi.cl.Send(&pgproto3.RowDescription{
Fields: []pgproto3.FieldDescription{TextOidFD(groupByCol), IntOidFD("connections count")},
Fields: []pgproto3.FieldDescription{TextOidFD(groupByCol), IntOidFD("count")},
}); err != nil {
spqrlog.Zero.Error().Err(err).Msg("Could not write header for backend connections")
return err
Expand Down
Loading

0 comments on commit c2701f7

Please sign in to comment.