Skip to content

Instantly share code, notes, and snippets.

@floratmin
floratmin / .sql
Created June 7, 2024 11:32
Exception
CREATE OR REPLACE FUNCTION shared.raise_exception(
value anyelement,
message text default 'Unhandled value',
detail text default null,
hint text default 'See value (type %s) in detail as JSON',
errcode text default 'raise_exception',
"constraint" text default null,
"schema" text default null,
"table" text default null,
"column" text default null