SIMILAR TO bug?

From: David Fetter <david(at)fetter(dot)org>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: SIMILAR TO bug?
Date: 2009-02-18 15:37:00
Message-ID: 20090218153700.GA17588@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Folks,

Perhaps I've misunderstood this, but in PostgreSQL 8.3.5, I get
disparate results from ~ and SIMILAR TO. For example:

This gives an unexpected result:

davidfetter(at)davidfetter=# SELECT 'abc' SIMILAR TO '^[a]';
?column?
----------
f
(1 row)

This one is what I expected.

davidfetter(at)davidfetter=# SELECT 'abc' ~ '^[a]';
?column?
----------
t
(1 row)

Did I misunderstand what SIMILAR TO does, or...?

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2009-02-18 15:39:10 Re: pg_migrator progress
Previous Message Peter Eisentraut 2009-02-18 15:32:03 Re: SE-PostgreSQL and row level security