1
0
Fork 0

Fix code style

This commit is contained in:
Alex Kotov 2023-01-25 19:46:16 +04:00
parent 91b057b0fb
commit f9448ab188
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -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;