BUG #11211: regexp_matches acts like a WHERE

From: mail(at)eduard-wulff(dot)de
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #11211: regexp_matches acts like a WHERE
Date: 2014-08-19 13:08:01
Message-ID: 20140819130801.2534.30713@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 11211
Logged by: Eduard Wulff
Email address: mail(at)eduard-wulff(dot)de
PostgreSQL version: 9.4beta2
Operating system: Debian testing AMD64
Description:

SELECT vorgangt.id,
(regexp_matches(vorgangt.text, '#\w{5,26}', 's'))[1] AS sernr,
regexp_replace(vorgangt.text, '\n', '⁋', 'g') AS text_in_einer_zeile
FROM vorgangt ORDER BY 1

This works to get the first match if there is one.

BUT: it also _eliminates_ all rows that do not match from the result set

EXPECTED: return NULL or at least an empty string if there is no match

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2014-08-19 13:57:53 Re: BUG #11208: Refresh Materialized View Concurrently bug using user Postgres
Previous Message rqmedes 2014-08-19 10:48:59 BUG #11210: Limit on Query causes error or no JSON labels in output