Skip to content

PostgreSQL: Parse ROUTINE and ALL PROCEDURES | ROUTINES IN SCHEMA grant targets - #2761

Open
LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/grant-routine
Open

LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/grant-routine

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSQL's GRANT and REVOKE take ON ROUTINE with the same signature list as ON FUNCTION and ON PROCEDURE, and cover a whole schema with ON ALL PROCEDURES IN SCHEMA and ON ALL ROUTINES IN SCHEMA (https://www.postgresql.org/docs/current/sql-grant.html). None of the three parsed. GRANT EXECUTE ON ROUTINE f(int) TO bob failed with Expected: TO, found: f, and GRANT EXECUTE ON ALL ROUTINES IN SCHEMA s TO bob with Expected: TO, found: ROUTINES.

GrantObjects gains Routines, AllProceduresInSchema and AllRoutinesInSchema, next to the Functions and Procedures variants from #2727. A routine can be a function or a procedure, so each form keeps its own variant and prints back as written.

@codecov-commenter

codecov-commenter commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.49%. Comparing base (c45d1f4) to head (a9a1160).

Files with missing lines Patch % Lines
src/parser/mod.rs 87.50% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2761   +/-   ##
=======================================
  Coverage   82.48%   82.49%           
=======================================
  Files          42       42           
  Lines       35469    35495   +26     
  Branches    35469    35495   +26     
=======================================
+ Hits        29258    29282   +24     
  Misses       2675     2675           
- Partials     3536     3538    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants