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