Backslash Bug in ARE Class-Shorthand Escape?

From: david(at)fetter(dot)org (David Fetter)
To: pgsql-bugs(at)postgresql(dot)org
Subject: Backslash Bug in ARE Class-Shorthand Escape?
Date: 2003-12-06 07:23:29
Message-ID: oWqdnWaoa7NsHkyiXTWc-g@speakeasy.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Kind people,

I have a little puzzlement. In the first select, I double the
backslash and return true. In the second, I don't and get false.
Have I missed something important in the docs?

Cheers,
D

test=> select version();
version
-------------------------------------------------------------------------------------------------------
PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2
20030222 (Red Hat Linux 3.2.2-5)
(1 row)

test=> select ('123' ~ '\\d');
?column?
----------
t
(1 row)

test=> select ('123' ~ '\d');
?column?
----------
f
(1 row)

--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 cell: +1 415 235 3778

Not believing in force is the same as not believing in gravitation
Leon Trotsky

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Joe Conway 2003-12-06 08:15:28 Re: Backslash Bug in ARE Class-Shorthand Escape?
Previous Message saint 2003-12-05 19:37:23 (ver. 7.4) select netmask('192.168.1.5/24') return '255.255.255.0/24' not '255.255.255.0' (example in docs)