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

sql: logic test to inform maximum builtin function oid change #86008

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkg/sql/logictest/testdata/logic_test/pg_catalog
Original file line number Diff line number Diff line change
Expand Up @@ -4670,6 +4670,21 @@ query T
SELECT proname FROM pg_catalog.pg_proc WHERE oid = 0
----

let $cur_max_builtin_oid
SELECT cur_max_builtin_oid FROM [SELECT max(oid) as cur_max_builtin_oid FROM pg_catalog.pg_proc]

## If this test failed (proname is the same, but oid increased), it's likely that a
## new builtin function is implemented and it's somewhere in the middle of the
## existing functions at init time. Though the changes to builtin function OID is
## generally ok, it's still better if we could move the new implement to end of the
## list at init time (see all_builtins.go)
## TODO(chengxiong): consider to have a deterministic list of builtin function oids
## so that new implementations can just be added to it.
query TT
SELECT proname, oid FROM pg_catalog.pg_proc WHERE oid = $cur_max_builtin_oid
----
to_regtype 2031

## Ensure that unnest works with oid wrapper arrays

query O
Expand Down