Tobias Bußmann wrote:
> CONSTRAINT enforce_covertype CHECK ((geomtype LIKE 'POLYGON%') AND
> (covertype >= 0 AND covertype < 6)) OR NOT (geomtype LIKE 'POLYGON%')
Fast!, die Klammerung hat 'nen Fehler, den der komplette Ausdruck
hinter dem CHECK muss geklammert werden, die LIKE-Ausdruecke kommen
hingegen auch ohne Klammer aus:
CONSTRAINT enforce_covertype CHECK (
(geomtype LIKE 'POLYGON%' AND (covertype >= 0 AND covertype < 6))
OR geomtype NOT LIKE 'POLYGON%'
)
.... funktioniert,
Martin.
--
Unix _IS_ user friendly - it's just selective about who its friends are !
--------------------------------------------------------------------------