Skip to content

Commit 84db100

Browse files
authored
Merge pull request #17 from PostHog/fix/skip-rowdesc-zero-columns
Skip RowDescription for queries with 0 columns
2 parents 6bbb929 + dabace0 commit 84db100

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

server/conn.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,9 @@ func (c *clientConn) handleExecute(body []byte) {
11901190
// Send RowDescription if Describe wasn't called before Execute.
11911191
// Some clients skip Describe and go straight to Execute, but still
11921192
// need the column metadata before receiving data rows.
1193-
if !p.described {
1193+
// Skip if there are no columns - queries that return 0 columns (like
1194+
// DDL accidentally routed here) don't need RowDescription.
1195+
if !p.described && len(cols) > 0 {
11941196
if err := c.sendRowDescription(cols, colTypes); err != nil {
11951197
return
11961198
}

0 commit comments

Comments
 (0)