pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #10334: Function regexp_split_to_array Error with '.' (comma)
2+ messages / 2 participants
[nested] [flat]
* BUG #10334: Function regexp_split_to_array Error with '.' (comma)
@ 2014-05-16 02:03 danilogarciamartins@hotmail.com
2014-05-16 17:25 ` Re: BUG #10334: Function regexp_split_to_array Error with '.' (comma) Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: danilogarciamartins@hotmail.com @ 2014-05-16 02:03 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 10334
Logged by: Danilo
Email address: danilogarciamartins@hotmail.com
PostgreSQL version: 9.2.4
Operating system: Windows 7 64 bits
Description:
Ex.: select regexp_split_to_array('1.2.3','.')
returns {"","","","","",""} and not
{1,2,3}.
Thanks
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #10334: Function regexp_split_to_array Error with '.' (comma)
2014-05-16 02:03 BUG #10334: Function regexp_split_to_array Error with '.' (comma) danilogarciamartins@hotmail.com
@ 2014-05-16 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2014-05-16 17:25 UTC (permalink / raw)
To: danilogarciamartins@hotmail.com; +Cc: pgsql-bugs
danilogarciamartins@hotmail.com writes:
> Ex.: select regexp_split_to_array('1.2.3','.')
> returns {"","","","","",""} and not
> {1,2,3}.
This is not a bug: "." is a wild-card character in regular expressions.
You could get the behavior you're evidently after by escaping it:
# select regexp_split_to_array('1.2.3','\.');
regexp_split_to_array
-----------------------
{1,2,3}
(1 row)
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2014-05-16 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-05-16 02:03 BUG #10334: Function regexp_split_to_array Error with '.' (comma) danilogarciamartins@hotmail.com
2014-05-16 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
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