diff schema/gemma.sql @ 4728:bfbdcf67ae55 stack-polygons

Merged default into stack-polygons branch.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 17 Oct 2019 22:37:04 +0200
parents baabc2b2f094
children 2440d2f86f4e
line wrap: on
line diff
--- a/schema/gemma.sql	Thu Oct 17 21:31:03 2019 +0200
+++ b/schema/gemma.sql	Thu Oct 17 22:37:04 2019 +0200
@@ -350,7 +350,9 @@
 CREATE SCHEMA internal
     -- Profile data are only accessible via the view users.list_users.
     CREATE TABLE user_profiles (
-        username varchar PRIMARY KEY CHECK(octet_length(username) <= 63),
+        username varchar PRIMARY KEY
+            CHECK(octet_length(username) <= 63)
+            CHECK(to_regrole(quote_ident(username)) IS NOT NULL),
         -- keep username length compatible with role identifier
         country char(2) NOT NULL REFERENCES countries,
         map_extent box2d NOT NULL,