Skip to content

Commit 6bbb929

Browse files
authored
Merge pull request #16 from PostHog/fix/describe-flag-timing
Fix described flag set before RowDescription is actually sent
2 parents b0725ee + b309198 commit 6bbb929

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/conn.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,6 @@ func (c *clientConn) handleDescribe(body []byte) {
10681068
c.sendError("ERROR", "34000", fmt.Sprintf("portal %q does not exist", name))
10691069
return
10701070
}
1071-
p.described = true
10721071

10731072
// For non-SELECT, send NoData
10741073
upperQuery := strings.ToUpper(strings.TrimSpace(p.stmt.query))
@@ -1105,6 +1104,9 @@ func (c *clientConn) handleDescribe(body []byte) {
11051104
return
11061105
}
11071106

1107+
// Only mark as described when we actually send RowDescription.
1108+
// If we sent NoData above, Execute should still send RowDescription.
1109+
p.described = true
11081110
c.sendRowDescription(cols, colTypes)
11091111

11101112
default:

0 commit comments

Comments
 (0)