Re: BUG #10889: Cannot add 2 floats from regular expression

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #10889: Cannot add 2 floats from regular expression
Date: 2014-07-07 15:42:46
Message-ID: 23769.1404747766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> Suggest wrapping it in a function - or making a "regexp_matches_single"
> function that behaves similarly but returns a single text[] instead of a
> SETOF text[]

I wonder if we should have such a thing built-in. This isn't the first
complaint we've heard about the SETOF API being awkward to use, and it's
only needed if you specify the 'g' flag. Perhaps we could have a variant
that forbids 'g' and returns a non-set (either the single match, or NULL).

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G Johnston 2014-07-07 15:58:26 Re: BUG #10889: Cannot add 2 floats from regular expression
Previous Message David G Johnston 2014-07-07 15:25:26 Re: BUG #10889: Cannot add 2 floats from regular expression