Skip to content

json_each

Enterprise scalar function reference.

Function Snapshot

Field Value
Function json_each
Category JSON and Object
Scope Scalar expression
Discovery SELECT * FROM pg_catalog.pg_proc WHERE proname = 'json_each';

Purpose

Expands an object or array into key-value or index-value pairs inside an array(object) result.

Syntax

SELECT json_each({"x":1,"y":2});

Parameters

  • Positional arguments as defined by overload signatures in pg_catalog.pg_proc.

Returns

  • Returns array(object) entries with key/index and value.

Null and Error Behavior

  • Most overloads are deterministic and null-propagating unless documented otherwise.
  • Validate concrete overload behavior with pg_catalog.pg_proc in your running build.

Operational Notes

  • Use schema-qualified objects and parameterized queries for production pipelines.
  • Validate overload details in-cluster with pg_catalog.pg_proc and pg_get_function_result(oid).

Cross-References