Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: CHECK-Constraint mit WHERE ?



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 !
--------------------------------------------------------------------------



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group