Skip to content

Commit

Permalink
Set default search path for PostgreSQL functions.
Browse files Browse the repository at this point in the history
Resolves #525.
  • Loading branch information
MattBlissett committed Oct 10, 2024
1 parent 0c1d2c4 commit 96c9987
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

<!-- Set the search paths to public. For security, VACUUM uses an empty search path and fails otherwise.
https://stackoverflow.com/questions/65237130/getting-function-does-not-exist-error-in-vacuumdb -->
<changeSet id="146" author="mblissett">
<sql>
ALTER FUNCTION collection_change_trigger SET search_path = public;
ALTER FUNCTION collection_contact_change_trigger SET search_path = public;
ALTER FUNCTION collection_descriptor_change_trigger SET search_path = public;
ALTER FUNCTION collection_descriptor_group_change_trigger SET search_path = public;
ALTER FUNCTION collection_descriptor_verbatim_change_trigger SET search_path = public;
ALTER FUNCTION contact_change_trigger SET search_path = public;
ALTER FUNCTION dataset_change_trigger SET search_path = public;
ALTER FUNCTION installation_change_trigger SET search_path = public;
ALTER FUNCTION institution_change_trigger SET search_path = public;
ALTER FUNCTION network_change_trigger SET search_path = public;
ALTER FUNCTION node_change_trigger SET search_path = public;
ALTER FUNCTION organization_change_trigger SET search_path = public;
ALTER FUNCTION normalize_name SET search_path = public;
</sql>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,5 @@
<include file="liquibase/143-removed-fields-grscicoll.xml" />
<include file="liquibase/144-mdt-endpoint-installation-types.xml" />
<include file="liquibase/145-contact-salutation.xml" />
<include file="liquibase/146-function-search-paths.xml" />
</databaseChangeLog>

0 comments on commit 96c9987

Please sign in to comment.