-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add universal "drop function" for our initialization queries #1180
Comments
slifty
added a commit
that referenced
this issue
Sep 20, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
slifty
added a commit
that referenced
this issue
Sep 21, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
slifty
added a commit
that referenced
this issue
Sep 21, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
slifty
added a commit
that referenced
this issue
Sep 23, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
slifty
added a commit
that referenced
this issue
Sep 23, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
slifty
added a commit
that referenced
this issue
Sep 26, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
slifty
added a commit
that referenced
this issue
Sep 26, 2024
We use functions to transform rows of data into a consistent json format when returning values. We have opted to have a series of functions that are created as part of server start (as opposed to migrations) to allow us to flexibly edit the contents of the transformation over time without having a ton of redundant migrations for minor changes. This function will allow us to reliably remove past versions of these functions even in the event that the function signature changes. Issue #1180 Add universal "drop function" for our initialization queries
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We define some SQL functions that package tables into JSON.
Rather than use migrations for this (which would result in a lot of redundant code across migrations every time we wanted to tweak that form), we use "initialization" scripts which build out the functions.
@bickelj recently noted that in postgres, a function is defined not just by the name but also by the signature, which means "drop or replace" can leave old functions intact in the event that a signature changes.
Rather than have our initialization script filled with old signatures that stopped being used months ago, let's use an approach that will destroy all forms of a given function name for these scripts. An example is outlined here: https://stackoverflow.com/questions/7622908/drop-function-without-knowing-the-number-type-of-parameters
The text was updated successfully, but these errors were encountered: