Revision 14215
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
2968 | 2968 |
|
2969 | 2969 |
|
2970 | 2970 |
-- |
2971 |
-- Name: is_sqlstate(text); Type: FUNCTION; Schema: util; Owner: - |
|
2972 |
-- |
|
2973 |
|
|
2974 |
CREATE FUNCTION is_sqlstate(error_code text) RETURNS boolean |
|
2975 |
LANGUAGE sql IMMUTABLE |
|
2976 |
AS $_$ |
|
2977 |
SELECT error_code ~ '^[[:digit:][:upper:]]{5}$' |
|
2978 |
$_$; |
|
2979 |
|
|
2980 |
|
|
2981 |
-- |
|
2971 | 2982 |
-- Name: is_table(regclass); Type: FUNCTION; Schema: util; Owner: - |
2972 | 2983 |
-- |
2973 | 2984 |
|
Also available in: Unified diff
schemas/util.sql: added is_sqlstate()