pgrx
pgrx copied to clipboard
Adding a flag that forces `CREATE OR REPLACE FUNCTION` statements
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.
LGTM. Much appreciated
Thank you! Could you approve the workflow to run?
Thank you! Could you approve the workflow to run?
Done.
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. )
I have opened #683 which serves as an alternative solution to this problem.
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 😄
Closing in favor of #683
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.
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.