Re: Celko's Puzzle Number 5 - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Celko's Puzzle Number 5
Date
Msg-id 20060708152022.73354.qmail@web31810.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Celko's Puzzle Number 5  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
> http://www.postgresql.org/docs/8.1/interactive/functions-matching.html
> 
> Any of these CHECK expressions should work:
> 
>   CHECK (alpha_only SIMILAR TO '[A-Za-z]+')
>   CHECK (alpha_only ~ '^[A-Za-z]+$')
>   CHECK (alpha_only ~* '^[a-z]+$')
> 
> Unfortunately, even though SIMILAR TO has been standard SQL for
> several years, not all databases implement it.  Many databases
> do support regular expressions but generally via a non-standard
> syntax (as PostgreSQL does with its ~, ~*, !*, and !~*  operators).

Thanks for the link!

Regards,

Richard Broersma Jr.


pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: table joining duplicate records
Next
From: T E Schmitz
Date:
Subject: Re: SELECT substring with regex