Regular Expressions and SELECT

From: Desmond Coughlan <psql(at)zeouane(dot)org>
To: PostgreSQL Novice Mailing List <pgsql-novice(at)postgresql(dot)org>
Subject: Regular Expressions and SELECT
Date: 2003-01-22 22:08:12
Message-ID: 20030122220812.GS33534@lievre.voute.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I'm working through Bruce Momjian's online tutorial on PostreSQL, and am
now trying to get my head around regular expressions. The tutorial says
that ~ '^X' where 'X' is a character, will find table entries beginning
with that character.

When I try it ...

SELECT * FROM testdb ~'^d' ;
ERROR: parser: parse error at or near "~"

I get this, irrespective of the regular expression that I use. It _is_ a
tilde, isn't it ? Or is my eyesight going ..? :-(

Thanks.

D.

--
Desmond Coughlan |'Io non mori, e non rimasi vivo'
desmond(at)zeouane(dot)org
http://www.zeouane.org

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Desmond Coughlan 2003-01-22 22:33:31 Re: Regular Expressions and SELECT
Previous Message Chad Thompson 2003-01-22 15:52:24 Re: installing pgsql