Commit 097ee76
server: handle Describe Portal for declared cursors (psycopg3 compat)
psycopg3's ServerCursor sends Describe Portal with the cursor name
after DECLARE CURSOR. In PostgreSQL, declared cursors are accessible
as portals, but DuckGres stores them separately in c.cursors.
When Describe Portal can't find the name in c.portals, fall back to
checking c.cursors and return the cursor's schema. This is needed for
psycopg3's ServerCursor.execute() flow which describes the cursor
portal to get column metadata before fetching rows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e430e7e commit 097ee76
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3580 | 3580 | | |
3581 | 3581 | | |
3582 | 3582 | | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
3583 | 3596 | | |
3584 | 3597 | | |
3585 | 3598 | | |
| |||
0 commit comments