cockroachdb / cockroachdb/cockroach
sql: Support CALL statements for pausable portals
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
In Postgres, pausable portal is supported with CALL statement with store procedures. E.g.:
```
send
Parse {"Name": "foo", "Query": "CALL fab5()"}
Bind {"DestinationPortal": "foo", "PreparedStatement": "foo"}
Bind {"DestinationPortal": "foo2", "PreparedStatement": "foo"}
Execute {"Portal": "foo", "MaxRows": 100}
Sync
----
# PG allows procedure with pausable portal, but CRDB does not.
until noncrdb_only ignore=RowDescription ignore=NoticeResponse
ReadyForQuery
----
{"Type":"ParseComplete"}
{"Type":"BindComplete"}
{"Type":"BindComplete"}
{"Type":"CommandComplete","CommandTag":"CALL"}
{"Type":"ReadyForQuery","TxStatus":"I"}
```
We now disallow it in https://github.com/cockroachdb/cockroach/pull/151153.
Jira issue: CRDB-53331
Epic CRDB-25183
Contributor guide
Research direction
Start by reading the pausable-portal behavior described in the issue and the referenced pull request #151153, then locate the SQL and PostgreSQL protocol handling for CALL statements. Reproduce the two-portal example and compare CockroachDB's response with PostgreSQL. Done means CALL procedures can use pausable portals without the current disallowance, with coverage for the shown protocol sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100