From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | SQL Postgresql List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Celko's Puzzle Number 5 |
Date: | 2006-07-08 15:20:22 |
Message-ID: | 20060708152022.73354.qmail@web31810.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | T E Schmitz | 2006-07-08 15:40:15 | Re: SELECT substring with regex |
Previous Message | Richard Broersma Jr | 2006-07-08 15:19:19 | Re: table joining duplicate records |