Skip to content

PostgreSQL: Support CREATE OR REPLACE PROCEDURE - #2851

Open
MrBisonte wants to merge 1 commit into
apache:mainfrom
MrBisonte:feat/postgres-create-or-replace-procedure
Open

MrBisonte wants to merge 1 commit into
apache:mainfrom
MrBisonte:feat/postgres-create-or-replace-procedure

Conversation

@MrBisonte

Copy link
Copy Markdown
Contributor

Dialects: PostgreSQL, Generic

CREATE OR REPLACE PROCEDURE p () LANGUAGE sql BEGIN ATOMIC SELECT 1; END failed with Expected: [EXTERNAL] TABLE or [MATERIALIZED] VIEW or FUNCTION or AGGREGATE or SCHEMA or WAREHOUSE after CREATE OR REPLACE, found: PROCEDURE. The PostgreSQL synopsis is CREATE [ OR REPLACE ] PROCEDURE: https://www.postgresql.org/docs/current/sql-createprocedure.html

parse_create now reaches parse_create_procedure before that error, and Statement::CreateProcedure gains or_replace. A modifier next to OR REPLACE, such as OR ALTER or TEMPORARY, stays an error. parse_create_procedure takes or_replace as a new argument.

OR REPLACE with a string body needs #2841.

Written with an AI coding assistant.

@codecov-commenter

codecov-commenter commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.30%. Comparing base (5201fb1) to head (cf49649).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2851   +/-   ##
=======================================
  Coverage   83.29%   83.30%           
=======================================
  Files          42       42           
  Lines       35372    35384   +12     
  Branches    35372    35384   +12     
=======================================
+ Hits        29463    29476   +13     
  Misses       2456     2456           
+ Partials     3453     3452    -1     

☔ 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.

@MrBisonte
MrBisonte force-pushed the feat/postgres-create-or-replace-procedure branch from 04e268b to cf49649 Compare November 15, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants