Skip to content

fix: resolve multi-word types when filtering functions by args - #1148

Open
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/function-args-multiword-types
Open

hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/function-args-multiword-types

Conversation

@hsusul

@hsusul hsusul commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • Fixes functions.create/retrieve fails for multi-word argument types #1146: functions.create / retrieve failed for args like double precision and timestamp with time zone because only the last space-separated token was cast to regtype.
  • Resolve unnamed multi-word SQL types as a whole; for named args, drop the first token and cast the remainder.
  • Regression test covers create + retrieve by multi-word types.

Test plan

  • npx vitest run test/index.test.ts -t "create and retrieve function with multi-word|retrieve function by args filter - polymorphic|retrieve, create, update, delete"
  • Studio: create a function with a double precision argument and confirm it returns successfully

Taking only the last space-separated token made double precision and
timestamp with time zone fail regtype casts during create/retrieve.
@hsusul
hsusul requested review from a team, avallete and soedirgo as code owners September 6, 2026 06:51
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.

functions.create/retrieve fails for multi-word argument types

1 participant