Skip to main content

Stored Functions

Stored function execution is disabled by default.

Enable it explicitly:

pgDashboard({
connectionString: process.env.DATABASE_URL,
enableFunctions: true,
});

What The UI Does

When enabled, PG Dashboard:

  • lists public PostgreSQL functions;
  • reads function parameters;
  • generates a form for the parameter values;
  • executes the selected function;
  • displays returned rows in the same grid style used by table reports.

Parameter Inputs

Inputs are generated from PostgreSQL parameter metadata:

  • numeric types use text inputs with numeric sanitization;
  • text types use text inputs;
  • boolean parameters use a dropdown;
  • empty required parameters are blocked.

Security Rules

The backend validates execution requests:

  • enableFunctions must be true;
  • function name must exist in PostgreSQL metadata;
  • parameter count must match the function signature;
  • missing parameters are rejected;
  • values are passed with pg placeholders.

Important Warning

PostgreSQL functions can have side effects. They may insert, update, delete, send notifications, or perform other sensitive work.

Only enable function execution for trusted users.