pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: SQL Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: Celko's Puzzle Number 5
Date: Sat, 8 Jul 2006 08:20:22 -0700 (PDT)
Message-ID: <20060708152022.73354.qmail@web31810.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060708115403.GA13518@winnie.fuhr.org>

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



view thread (3+ messages)

Message-ID: <20060708152022.73354.qmail@web31810.mail.mud.yahoo.com>
Permalink:  ../20060708152022.73354.qmail@web31810.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060708152022.73354.qmail@web31810.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rabroersma@yahoo.com, mike@fuhr.org
  Subject: Re: Celko's Puzzle Number 5
  In-Reply-To: <20060708152022.73354.qmail@web31810.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox