Cloud

pg_get_ruledef

The pg_get_ruledef() function takes the identifier of a rule and returns NULL. Redpanda SQL accepts the call for PostgreSQL client compatibility.

Syntax

pg_get_ruledef(rule_oid)
pg_get_ruledef(rule_oid, pretty_bool)

You can also call the function as pg_catalog.pg_get_ruledef().

Parameters

  • rule_oid: Object identifier (OID) of a rule. The type can be oid, integer, or bigint.

  • pretty_bool: Optional. Boolean argument. The result is NULL for either value.

Return type

text. The function returns NULL for every argument.

Examples

The function returns NULL for any OID:

SELECT pg_get_ruledef(0);

The two-argument form also returns NULL:

SELECT pg_get_ruledef(0, true);