Add definition of anyarray_uniq
function to helpers sql
#422
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, it turns out that this function
anyarray_uniq
is NOT a pre-loaded array function that we get for free through the pg_catalog. This morning, we started seeing this critical error:and it turns out that
anyarray_uniq
was no longer defined. Given that this function lies within the definition of other vital functions that power key WOW interactions, likeget_assoc_addrs_from_bbl
, our search function.Since
anyarray_uniq
does not get created through any script that powers our auto-updating instance of nycdb, I suspect that somehow this function got deleted during our rebuild and there was no code to recreate it.So, this PR adds a function definition to our
helpers.sql
file to explicitly buildanyarray_uniq
whenever we rebuild the db. It also reorders our code a bit to make sure every function declaration runs in the proper order.