Rename func "is_name" to "is_sane_text"
This commit is contained in:
parent
ac06d83542
commit
eca4794f2f
3 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
BEGIN;
|
||||
DROP FUNCTION is_name;
|
||||
DROP FUNCTION is_sane_text;
|
||||
DROP FUNCTION is_language_code;
|
||||
COMMIT;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE FUNCTION is_name(value TEXT)
|
||||
CREATE FUNCTION is_sane_text(value TEXT)
|
||||
RETURNS BOOLEAN
|
||||
IMMUTABLE
|
||||
PARALLEL SAFE
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue