Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE OR REPLACE FUNCTION #1146

Merged
merged 14 commits into from
Sep 18, 2023
Merged

CREATE OR REPLACE FUNCTION #1146

merged 14 commits into from
Sep 18, 2023

Conversation

xzdandy
Copy link
Collaborator

@xzdandy xzdandy commented Sep 17, 2023

  • Support from parser to executor.
  • Fix existing unit tests and short integration tests.
  • Add unit tests for CREATE OR REPALCE FUNCTION
  • Update documentation
  • Add integration test
  • Check no long integration test failed due to this PR

Close #1131

@xzdandy xzdandy added the Feature Request ✨ New feature or request label Sep 17, 2023
@xzdandy xzdandy added this to the v0.3.5 milestone Sep 17, 2023
@xzdandy xzdandy self-assigned this Sep 17, 2023
@xzdandy xzdandy marked this pull request as ready for review September 18, 2023 07:30
Copy link
Member

@jiashenC jiashenC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will be the bahavior of CREATE OR REPLACE FUNCTION ... IF NOT EXISTS ...?

It seems like Postgres (https://www.postgresql.org/docs/current/sql-createfunction.html) only allows CREATE OR REPLACE but not IF NOT EXISTS for FUNCTION.

@xzdandy
Copy link
Collaborator Author

xzdandy commented Sep 18, 2023

What will be the bahavior of CREATE OR REPLACE FUNCTION ... IF NOT EXISTS ...?

It seems like Postgres (https://www.postgresql.org/docs/current/sql-createfunction.html) only allows CREATE OR REPLACE but not IF NOT EXISTS for FUNCTION.

What will be the bahavior of CREATE OR REPLACE FUNCTION ... IF NOT EXISTS ...?

It seems like Postgres (https://www.postgresql.org/docs/current/sql-createfunction.html) only allows CREATE OR REPLACE but not IF NOT EXISTS for FUNCTION.

Yes, Postgres only supports ‘OR REPLACE’. I think it does not hurt support both, so did not remove the ‘IF NOT EXISTS’ support. When both are specified, an error message is raised.

@xzdandy xzdandy merged commit d4fe198 into staging Sep 18, 2023
@xzdandy xzdandy deleted the create_replace branch September 18, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CREATE OR REPLACE support
2 participants