surfacecleaningparam_clear
Cleaningscalar · returns varchar

PARAM_CLEAR

Clear a session parameter previously set via PARAM_SET

Per-row — runs once for each row.

cleaningpipeline-composabledeterministic

Arguments

nametypedescription
keyVARCHAR

About

Clear a session parameter previously set with PARAM_SET. Used together with the `@deref` syntax for session-scoped values inside SQL. Useful when managing per-session state across a long-running pgwire connection: remove a stale region, reset a user-specific toggle, drop a temporary override before subsequent queries pick it up. Subsequent reads of the cleared key fall back to the default value (or NULL, depending on how the caller reads it).

Examples

Clears a parameter and yields NULL so callers can apply a fallback

SELECT
  COALESCE(
    CAST(@ param_clear ('region') AS VARCHAR),
    'cleared'
  )

Nearby rabbit holes

same domain
Climb back to The Looking Glass