xssbook2/db/rest/util/_api_raise_null.sql

18 lines
294 B
PL/PgSQL

CREATE FUNCTION _api.raise_null(
_column TEXT DEFAULT ''
)
RETURNS BOOLEAN
LANGUAGE plpgsql VOLATILE
AS $BODY$
BEGIN
PERFORM _api.raise(
_msg => 'api_null_value',
_detail => _column
);
RETURN TRUE;
END
$BODY$;
GRANT EXECUTE ON FUNCTION _api.raise_null(TEXT)
TO rest_anon, rest_user;