Prob with regexp - Mailing list pgsql-hackers

From Philippe Rochat
Subject Prob with regexp
Date
Msg-id 3ABA3F8D.47C942A3@lbdsun.epfl.ch
Whole thread Raw
Responses Re: Prob with regexp  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Prob with regexp  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I think there is a prob with regexp, which is comparing one less
character as it should. Below is an example. Result is that last
character is omitted !

Ph.R.

postgres=# select * from pg_database where datname ~ 'ibd01*';datname | datdba | encoding | datpath 
---------+--------+----------+---------ibd00_8 |    505 |        0 | ibd00_8ibd00_1 |    505 |        0 |
ibd00_1ibd00_2|    505 |        0 | ibd00_2ibd00_3 |    505 |        0 | ibd00_3ibd00_4 |    505 |        0 |
ibd00_4ibd00_5|    505 |        0 | ibd00_5ibd00_6 |    505 |        0 | ibd00_6ibd00_7 |    505 |        0 |
ibd00_7ibd00_9|    505 |        0 | ibd00_9ibd01_1 |    505 |        0 | ibd01_1ibd01_2 |    505 |        0 |
ibd01_2ibd01_3|    505 |        0 | ibd01_3ibd01_4 |    505 |        0 | ibd01_4ibd01_5 |    505 |        0 | ibd01_5
 
(14 rows)

postgres=# select * from pg_database where datname ~ 'ibd01_*';datname | datdba | encoding | datpath 
---------+--------+----------+---------ibd01_1 |    505 |        0 | ibd01_1ibd01_2 |    505 |        0 |
ibd01_2ibd01_3|    505 |        0 | ibd01_3ibd01_4 |    505 |        0 | ibd01_4ibd01_5 |    505 |        0 | ibd01_5
 
(5 rows)


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Call for platforms
Next
From: Tom Lane
Date:
Subject: Re: Prob with regexp