Fix code style
This commit is contained in:
parent
91b057b0fb
commit
f9448ab188
1 changed files with 5 additions and 8 deletions
|
@ -1,16 +1,13 @@
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
||||||
CREATE FUNCTION is_name(value TEXT) RETURNS BOOLEAN LANGUAGE plpgsql AS $$
|
CREATE FUNCTION is_name(value TEXT) RETURNS BOOLEAN LANGUAGE plpgsql
|
||||||
BEGIN
|
AS $$BEGIN
|
||||||
RETURN value = btrim(value) AND length(value) > 0;
|
RETURN value = btrim(value) AND length(value) > 0;
|
||||||
END;
|
END$$;
|
||||||
$$;
|
|
||||||
|
|
||||||
CREATE FUNCTION is_language_code(value VARCHAR) RETURNS BOOLEAN LANGUAGE plpgsql
|
CREATE FUNCTION is_language_code(value VARCHAR) RETURNS BOOLEAN LANGUAGE plpgsql
|
||||||
AS $$
|
AS $$BEGIN
|
||||||
BEGIN
|
|
||||||
RETURN value ~ '^[a-z]{2}$';
|
RETURN value ~ '^[a-z]{2}$';
|
||||||
END;
|
END$$;
|
||||||
$$;
|
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
Loading…
Reference in a new issue