1
0
Fork 0

Rename func "is_name" to "is_sane_text"

This commit is contained in:
Alex Kotov 2023-02-05 02:46:09 +04:00
parent ac06d83542
commit eca4794f2f
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
BEGIN;
DROP FUNCTION is_name;
DROP FUNCTION is_sane_text;
DROP FUNCTION is_language_code;
COMMIT;

View file

@ -1,6 +1,6 @@
BEGIN;
CREATE FUNCTION is_name(value TEXT)
CREATE FUNCTION is_sane_text(value TEXT)
RETURNS BOOLEAN
IMMUTABLE
PARALLEL SAFE

View file

@ -6,8 +6,8 @@ CREATE TABLE languages (
english_name VARCHAR NOT NULL,
self_name VARCHAR NOT NULL,
CONSTRAINT code_is_language_code CHECK (is_language_code(code)),
CONSTRAINT english_name_is_name CHECK (is_name(english_name)),
CONSTRAINT self_name_is_name CHECK (is_name(self_name))
CONSTRAINT english_name_is_sane_text CHECK (is_sane_text(english_name)),
CONSTRAINT self_name_is_sane_text CHECK (is_sane_text(self_name))
);
CREATE UNIQUE INDEX languages_code ON languages (code);