Skip to content

Commit 2c780c9

Browse files
EDsCODEclaude
andcommitted
Fix missing RowDescription when Describe is skipped
In the extended query protocol, Describe is optional. Some clients (like Fivetran) skip Describe and go directly from Bind to Execute. The server was not sending RowDescription in this case, causing "Received resultset tuples, but no field structure for them" errors. Now Execute checks if Describe was called (via the portal.described flag) and sends RowDescription if needed before sending data rows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5ccb785 commit 2c780c9

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
@@ -1176,7 +1176,14 @@ func (c *clientConn) handleExecute(body []byte) {
11761176
typeOIDs[i] = getTypeInfo(ct).OID
11771177
}
11781178

1179-
// Don't send RowDescription here - it should come from Describe
1179+
// Send RowDescription if Describe wasn't called before Execute.
1180+
// Some clients skip Describe and go straight to Execute, but still
1181+
// need the column metadata before receiving data rows.
1182+
if !p.described {
1183+
if err := c.sendRowDescription(cols, colTypes); err != nil {
1184+
return
1185+
}
1186+
}
11801187

11811188
// Send rows with the format codes from Bind
11821189
rowCount := 0

0 commit comments

Comments
 (0)