Skip to content
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

Update helper setup to use DROP FUNCTION IF EXISTS #287

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

seanlinsley
Copy link
Member

If the return type of a function changes, CREATE OR REPLACE FUNCTION will fail with ERROR: cannot change return type of existing function. To make function setup more foolproof, this PR updates the documentation to instead use DROP FUNCTION IF EXISTS.

Note that I've only updated get_column_stats and get_relation_stats_ext since they return a subset of columns, while get_stat_replication for example does SELECT *, so shouldn't be affected when Postgres adds new columns in the future.

@seanlinsley seanlinsley merged commit 18d02ea into main Oct 15, 2024
@seanlinsley seanlinsley deleted the drop-function branch October 15, 2024 22:57
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.

2 participants