| From: | Martin Spott <Martin(dot)Spott(at)mgras(dot)net> |
|---|---|
| To: | pgsql-de-allgemein(at)postgresql(dot)org |
| Subject: | Re: CHECK-Constraint mit WHERE ? |
| Date: | 2006-06-22 22:52:51 |
| Message-ID: | e7f703$197a$1@osprey.mgras.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-de-allgemein |
Christoph Lamprecht wrote:
> Martin Spott <Martin(dot)Spott(at)mgras(dot)net> schrieb am 22.06.2006 15:58:26:
>> CONSTRAINT enforce_covertype CHECK (
>> (geomtype LIKE 'POLYGON%' AND (covertype >= 0 AND covertype < 6))
>> OR geomtype NOT LIKE 'POLYGON%'
>> )
> geht das nicht einfacher:
>
> CONSTRAINT enforce_covertype CHECK (
> geomtype NOT LIKE 'POLYGON%'
> OR (covertype >= 0 AND covertype < 6)
> )
Stimmt, leuchtet ein - und hat den selben Effekt,
Martin.
--
Unix _IS_ user friendly - it's just selective about who its friends are !
--------------------------------------------------------------------------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | A. Kretschmer | 2006-06-23 05:27:17 | Re: Problem mit Starten des "PostgreSQL Database Server 8.1" Dienstes |
| Previous Message | Christoph Lamprecht | 2006-06-22 22:03:27 | Re: CHECK-Constraint mit WHERE ? |