-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pgwire: fix for specific cases of unnamed portal execution
The Postgres docs say that an unnamed portal is automatically closed when a Bind command for another unnamed portal or a simple query is sent. We already implemented that for "normal" portals, but not for portals that were partially executed. This does not address the general case, but it does handle the common case that we see from tools like asyncpg. Release note (bug fix): Previously, executing an unnamed portal with a row count limit could encounter errors if another unnamed portal was opened. Now, CockroachDB correctly handles the common case of preparing and binding an unnamed portal by closing the existing unnamed portal. This matches the Postgres wire protocol.
- Loading branch information
Showing
2 changed files
with
148 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters