Skip to content

Conversation

@sumerman
Copy link
Contributor

@sumerman sumerman commented Jun 1, 2022

Adding a flag that forces CREATE OR REPLACE FUNCTION statements instead of plain CREATE FUNCTION statements pgx now produces by default.

The new default (#554) is potentially less destructive to pre-existing objects and more secure. Unfortunately, it complicates the upgrade path when using versioned shared objects.

@sumerman sumerman changed the base branch from master to develop June 1, 2022 11:55
instead of plain `CREATE FUNCTION` statements pgx now produces by
default.
The new default is potentially less destructive to pre-existing objects
and more secure. Unfortunately, it complicates upgrade path when using
versioned shared objects.
@sumerman sumerman force-pushed the optional_create_or_replace branch from dd96870 to 40bbfe8 Compare June 1, 2022 11:57
Copy link
Contributor

@eeeebbbbrrrr eeeebbbbrrrr left a comment

Choose a reason for hiding this comment

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

LGTM. Much appreciated

@sumerman
Copy link
Contributor Author

sumerman commented Jun 1, 2022

LGTM. Much appreciated

Thank you! Could you approve the workflow to run?

@eeeebbbbrrrr
Copy link
Contributor

Thank you! Could you approve the workflow to run?

Done.

@workingjubilee
Copy link
Member

workingjubilee commented Jun 1, 2022

A CLI flag that alters this behavior is a uniform hammer and does not account for other use cases which may want a composition of the two. ( Though this might still be what is desired if all you want is a hammer for now. )

@workingjubilee
Copy link
Member

I have opened #683 which serves as an alternative solution to this problem.

@sumerman
Copy link
Contributor Author

I have opened #683 which serves as an alternative solution to this problem.

Thank you for addressing this! #683 is ever so slightly more work for us, but we'll be fine 😄

@sumerman
Copy link
Contributor Author

Closing in favor of #683

@sumerman sumerman closed this Sep 13, 2022
@workingjubilee
Copy link
Member

I don't want to create more work for you, truly! We just are inevitably going to get "so, how about something that lets me have one function CREATEd and one function REPLACEd?" and then we'll have wanted #683 all along.

@sumerman
Copy link
Contributor Author

I don't want to create more work for you, truly! We just are inevitably going to get "so, how about something that lets me have one function CREATEd and one function REPLACEd?" and then we'll have wanted #683 all along.

No worries! As I’ve said — we’ll be fine 😅 I completely agree that #683 is more flexible and covers more use cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants