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

Initial support for DROP FUNCTION #1222

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Initial support for DROP FUNCTION #1222

merged 1 commit into from
Feb 25, 2025

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Feb 25, 2025

Adds initial support for DROP FUNCTION. (PostgreSQL Docs)

Two of the main features not supported yet are: cascading deletes of function dependencies, and restricting deletes when function dependencies are detected. The resolution of a type from its name also needs to fleshed out more to support types outside of the pg_catalog schema.

Copy link
Contributor

github-actions bot commented Feb 25, 2025

Main PR
covering_index_scan_postgres 360.31/s 361.30/s +0.2%
index_join_postgres 148.77/s 150.57/s +1.2%
index_join_scan_postgres 181.42/s 181.13/s -0.2%
index_scan_postgres 12.45/s 12.31/s -1.2%
oltp_point_select 2727.62/s 2743.75/s +0.5%
oltp_read_only 1855.85/s 1869.18/s +0.7%
select_random_points 109.69/s 109.46/s -0.3%
select_random_ranges 127.10/s 129.52/s +1.9%
table_scan_postgres 10.88/s 10.89/s 0.0%
types_table_scan_postgres 5.51/s 5.51/s 0.0%

Copy link
Contributor

Main PR
Total 42090 42090
Successful 15654 15685
Failures 26436 26405
Partial Successes1 5212 5213
Main PR
Successful 37.1917% 37.2654%
Failures 62.8083% 62.7346%

${\color{lightgreen}Progressions (32)}$

domain

QUERY: drop function array_elem_check(int);
QUERY: drop function dom_check(int);

drop_if_exists

QUERY: DROP FUNCTION IF EXISTS test_function_exists();
QUERY: DROP FUNCTION IF EXISTS no_such_schema.foo();

enum

QUERY: DROP FUNCTION echo_me(anyenum);

fast_default

QUERY: DROP FUNCTION foo(INT);

join

QUERY: drop function f_immutable_int4(int);

plpgsql

QUERY: drop function f1(x anyelement);
QUERY: select f1(stavalues1) from pg_statistic;
QUERY: select f1(stavalues1) from pg_statistic;
QUERY: drop function f1(int);
QUERY: drop function sp_add_user(text);
QUERY: drop function sp_id_user(text);
QUERY: drop function void_return_expr();
QUERY: drop function missing_return_expr();
QUERY: drop function shadowtest(int);
QUERY: drop function shadowtest();
QUERY: drop function compos();
QUERY: drop function compos();
QUERY: drop function compos();
QUERY: drop function zero_divide();
QUERY: drop function error2(p_name_table text);
QUERY: drop function cast_invoker(integer);
QUERY: drop function fail();
QUERY: drop function unreserved_test();

publication

QUERY: DROP FUNCTION testpub_rf_func2();

rangefuncs

QUERY: DROP FUNCTION getrngfunc8(int);

select_parallel

QUERY: drop function sp_simple_func(integer);

transactions

QUERY: DROP FUNCTION create_temp_tab();
QUERY: DROP FUNCTION invert(x float8);

union

QUERY: drop function expensivefunc(int);

updatable_views

QUERY: DROP FUNCTION leakproof(anyelement);

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@fulghum fulghum force-pushed the fulghum/drop_function branch 2 times, most recently from d970506 to 9a8af05 Compare February 25, 2025 02:39
@fulghum fulghum requested a review from Hydrocharged February 25, 2025 02:51
Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fulghum fulghum force-pushed the fulghum/drop_function branch from 9a8af05 to c5a77ea Compare February 25, 2025 17:24
@fulghum fulghum merged commit 14b076a into main Feb 25, 2025
14 checks passed
@fulghum fulghum deleted the fulghum/drop_function branch February 25, 2025 17:49
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