Skip to content
Aurabase Logo
aurabase

Call a Postgres function

POST/v1/db/{project_id}/rpc/{function}

Invokes a PL/pgSQL function. Automatically generated TypeScript types. RLS applied in the function body via SECURITY INVOKER.

Bodysuit#

ParameterTypeRequiredDescription
functionstringyesName of the Postgres function (in your project schema).
argsobjectnoNamed arguments passed to the function. Inferred types on the SDK side.

Engine#

Attention

This route only exists for Postgres projects served by PostgREST — it is PostgREST that executes the call. The aura-db service (MongoDB project, or Postgres with PostgREST disabled) does not declare any /rpc/routes.

Security#

Attention

By default, functions are created in SECURITY INVOKER. To bypass RLS in a function, use SECURITY DEFINER with caution — document why.