From: jakub.vrbas@inspire.cz
To: pgsql-bugs@postgresql.org
Subject: BUG #10889: Cannot add 2 floats from regular expression
Date: Mon, 07 Jul 2014 13:58:24 +0000
Message-ID: <20140707135824.2752.47779@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 10889
Logged by: Jakub Vrbas
Email address: jakub.vrbas@inspire.cz
PostgreSQL version: 9.1.13
Operating system: Debian
Description:
I have test_column (of type character varying). If I parse a float by
regular expression, it isn't possible to add it to another float from
regular expression.
Example:
SELECT
(regexp_matches(test_column, '([0-9\.]*)'))[1]::float
+
(regexp_matches(test_column, '([0-9\.]*)'))[1]::float
FROM test_table
Results in "ERROR: functions and operators can take at most one set
argument"
Example 2 is OK:
SELECT
float_column
+
float_column
FROM (
SELECT
(regexp_matches(test_column, '([0-9\.]*)'))[1]::float AS float_column
FROM test_table
) foo
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jakub.vrbas@inspire.cz
Subject: Re: BUG #10889: Cannot add 2 floats from regular expression
In-Reply-To: <20140707135824.2752.47779@wrigleys.postgresql.org>
References: <20140707135824.2752.47779@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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