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

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.21%. Comparing base (bac1468) to head (04e268b).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2851      +/-   ##
==========================================
+ Coverage   83.20%   83.21%   +0.01%     
==========================================
  Files          42       42              
  Lines       36471    35309    -1162     
  Branches    36471    35309    -1162     
==========================================
- Hits        30345    29382     -963     
+ Misses       2632     2481     -151     
+ Partials     3494     3446      -48     

☔ 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants