Skip to content

Commit b0725ee

Browse files
authored
Merge pull request #15 from PostHog/fix/row-description-without-describe
Fix missing RowDescription when Describe is skipped
2 parents ea1aa15 + 2c780c9 commit b0725ee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/conn.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,14 @@ func (c *clientConn) handleExecute(body []byte) {
11851185
typeOIDs[i] = getTypeInfo(ct).OID
11861186
}
11871187

1188-
// Don't send RowDescription here - it should come from Describe
1188+
// Send RowDescription if Describe wasn't called before Execute.
1189+
// Some clients skip Describe and go straight to Execute, but still
1190+
// need the column metadata before receiving data rows.
1191+
if !p.described {
1192+
if err := c.sendRowDescription(cols, colTypes); err != nil {
1193+
return
1194+
}
1195+
}
11891196

11901197
// Send rows with the format codes from Bind
11911198
rowCount := 0

0 commit comments

Comments
 (0)