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

Changed created functions to persist on the root #1213

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

Hydrocharged
Copy link
Collaborator

This changes created functions such that they're now written to the root value, instead of being added to the global function list. This also supports overloading created functions.

@Hydrocharged Hydrocharged requested a review from fulghum February 18, 2025 14:09
Copy link
Contributor

Main PR
covering_index_scan_postgres 359.79/s 364.89/s +1.4%
index_join_postgres 155.05/s 154.35/s -0.5%
index_join_scan_postgres 183.71/s 185.16/s +0.7%
index_scan_postgres 12.59/s 12.56/s -0.3%
oltp_point_select 2855.77/s 2784.14/s -2.6%
oltp_read_only 1909.45/s 1885.37/s -1.3%
select_random_points 113.28/s 113.09/s -0.2%
select_random_ranges 127.04/s 130.20/s +2.4%
table_scan_postgres 11.19/s 11.12/s -0.7%
types_table_scan_postgres 5.65/s 5.61/s -0.8%

Copy link
Contributor

Main PR
Total 42090 42090
Successful 15651 15654
Failures 26439 26436
Partial Successes1 5211 5212
Main PR
Successful 37.1846% 37.1917%
Failures 62.8154% 62.8083%

${\color{red}Regressions (3)}$

plpgsql

QUERY:          create function f1(in i int, out j int) as $$
begin
  j := i+1;
  return;
end$$ language plpgsql;
RECEIVED ERROR: function "f1" already exists with same argument types (errno 1105) (sqlstate HY000)
QUERY:          create function void_return_expr() returns void as $$
begin
    perform 2+2;
end;$$ language plpgsql;
RECEIVED ERROR: function "void_return_expr" already exists with same argument types (errno 1105) (sqlstate HY000)
QUERY:          create function missing_return_expr() returns int as $$
begin
    perform 2+2;
end;$$ language plpgsql;
RECEIVED ERROR: function "missing_return_expr" already exists with same argument types (errno 1105) (sqlstate HY000)

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

domain

QUERY: select doubledecrement(null);

indexing

QUERY: select indexrelid::regclass, indrelid::regclass
  from pg_index where indexrelid::regclass::text like 'idxpart%';

regproc

QUERY: SELECT to_regclass('pg_catalog.pg_class');

sequence

QUERY: SELECT nextval('sequence_test'::regclass);
QUERY: SELECT nextval('sequence_test'::regclass);
QUERY: SELECT nextval('sequence_test'::regclass);

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.

Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Looks great! Awesome work!

@Hydrocharged Hydrocharged merged commit 9677227 into main Feb 18, 2025
18 checks passed
@Hydrocharged Hydrocharged deleted the daylon/root-functions branch February 18, 2025 20:53
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