Title: Support procedures in Cursor.callproc() · Issue #137 · PyGreSQL/PyGreSQL · GitHub
Open Graph Title: Support procedures in Cursor.callproc() · Issue #137 · PyGreSQL/PyGreSQL
X Title: Support procedures in Cursor.callproc() · Issue #137 · PyGreSQL/PyGreSQL
Description: Cursor.callproc() in pgdb runs select * from "procname"(...). Since PostgreSQL 11 there are also real procedures, which must be called with CALL: cur.callproc('my_proc', (21,)) # ProgrammingError: my_proc(integer) is a procedure # HINT: ...
Open Graph Description: Cursor.callproc() in pgdb runs select * from "procname"(...). Since PostgreSQL 11 there are also real procedures, which must be called with CALL: cur.callproc('my_proc', (21,)) # ProgrammingError: ...
X Description: Cursor.callproc() in pgdb runs select * from "procname"(...). Since PostgreSQL 11 there are also real procedures, which must be called with CALL: cur.callproc('my_proc', (21,)) # ...
Opengraph URL: https://github.com/PyGreSQL/PyGreSQL/issues/137
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support procedures in Cursor.callproc()","articleBody":"`Cursor.callproc()` in `pgdb` runs `select * from \"procname\"(...)`. Since PostgreSQL 11 there are also real procedures, which must be called with `CALL`:\n\n```python\ncur.callproc('my_proc', (21,))\n# ProgrammingError: my_proc(integer) is a procedure\n# HINT: To call a procedure, use CALL.\n```\n\nThe DB-API says that `callproc()` returns a modified copy of the parameters with output and input/output parameters replaced, which PyGreSQL does not support so far. For procedures, `CALL` returns exactly these values as a row.\n\nI plan to:\n\n- look up the kind of the routine in `pg_proc` and use `CALL` for procedures (`prokind = 'p'`), and the current `select` for functions,\n- return a copy of the parameters with the INOUT and OUT values of a procedure replaced (from the row returned by `CALL` and `proargmodes`); the row can still be fetched from the cursor,\n- parse the name with the same rule as table names since #67 (parts are taken literally, schema-qualified names work); today the name is just put in double quotes, so `'schema.proc'` does not work and a `\"` in the name breaks the query.\n\nFunctions keep their behavior. psycopg 3 does not implement `callproc()`, and psycopg2 has the same problem with procedures.\n","author":{"url":"https://github.com/Cito","@type":"Person","name":"Cito"},"datePublished":"2026-11-22T20:41:30Z","url":"https://github.com/PyGreSQL/PyGreSQL/issues/137"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:35cfb1ce-37bb-9558-01d8-65276b61c95a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 854C:20D380:335E8:4655D:6B046165 |
| html-safe-nonce | 0ee30f84a220ade5f4de01b8978ef7561eb99fe2995356a3f87b6318193ed20d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTRDOjIwRDM4MDozMzVFODo0NjU1RDo2QjA0NjE2NSIsInZpc2l0b3JfaWQiOiIxMDgxMDYyOTAyNDk0MTU5MjA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2561d9038e4ed7b3df61e412b06254322793e6a9ed60a84be0b7719a6cb0cbd2 |
| hovercard-subject-tag | issue:6547522795 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PyGreSQL/PyGreSQL/137/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a440238a4f708b75b38afe9f50715cbb855f62725d8b35de03ef06276a43c52/PyGreSQL/PyGreSQL/issues/137 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a440238a4f708b75b38afe9f50715cbb855f62725d8b35de03ef06276a43c52/PyGreSQL/PyGreSQL/issues/137 |
| og:image:alt | Cursor.callproc() in pgdb runs select * from "procname"(...). Since PostgreSQL 11 there are also real procedures, which must be called with CALL: cur.callproc('my_proc', (21,)) # ProgrammingError: ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Cito |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PyGreSQL/PyGreSQL git https://github.com/PyGreSQL/PyGreSQL.git |
| octolytics-dimension-user_id | 60857770 |
| octolytics-dimension-user_login | PyGreSQL |
| octolytics-dimension-repository_id | 51212044 |
| octolytics-dimension-repository_nwo | PyGreSQL/PyGreSQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 51212044 |
| octolytics-dimension-repository_network_root_nwo | PyGreSQL/PyGreSQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width