Show overloaded Postgres functions as distinct signatures in Studio API docs #52654
Unanswered
haiderimran019
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Studio API docs currently identify RPCs by function name and read one parameter schema from PostgREST's Swagger 2 document. When Postgres functions are overloaded, PostgREST exposes only one overload in that document (PostgREST #1154), so Studio cannot display or generate accurate snippets for the other signatures.
RpcContent.tsxalready carries a TODO for this limitation.For example,
search(term text)andsearch(term text, limit_count integer)share/rpc/search, but the docs may show only one argument set. A user can copy a snippet for the wrong overload or never discover the other callable signature.Proposed Studio approach
/rpc/{name}unchanged.search(term text)andsearch(term text, limit_count integer).Scope and non-goals
Design question
Would maintainers prefer overload selection in the function navigation list (
name(type, type)) or a signature selector within a single function page? I lean toward distinct navigation entries because each entry has a stable OID and its generated snippet is immediately unambiguous.All reactions