mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
otherwise there is no warranty to retrieve the correct constraint as its name is not unique
26 lines
704 B
SQL
26 lines
704 B
SQL
|
|
|
|
|
|
CREATE DOMAIN public.colordomain
|
|
AS text
|
|
COLLATE pg_catalog."default"
|
|
CONSTRAINT domainconstraint CHECK (VALUE = ANY (ARRAY['red'::text, 'green'::text, 'blue'::text]));
|
|
|
|
CREATE DOMAIN qgis_test.colordomain
|
|
AS text
|
|
COLLATE pg_catalog."default"
|
|
CONSTRAINT domainconstraint CHECK (VALUE = ANY (ARRAY['yellow'::text, 'cyan'::text, 'magenta'::text]));
|
|
|
|
CREATE DOMAIN qgis_test.flowerdomain
|
|
AS text
|
|
COLLATE pg_catalog."default"
|
|
CONSTRAINT domainconstraint CHECK (VALUE = ANY (ARRAY['Alchemilla'::text, 'Alstroemeria'::text, 'Alyssum'::text]));
|
|
|
|
CREATE TABLE qgis_test.colors
|
|
(
|
|
id SERIAL NOT NULL,
|
|
color_public colordomain,
|
|
color_qgis qgis_test.colordomain,
|
|
flower qgis_test.flowerdomain
|
|
)
|