Robert Haas <robertmh...@gmail.com> writes:
> But actually here's an even simpler workaround, which is IMHO less
> ugly than the original one:

> SELECT foo, bar, (SELECT regexp_matches(bar, pattern)) FROM table;

Doesn't that blow up if the subselect returns more than one row?

I think you could make it work by wrapping regexp_matches in a
simple (non-SETOF) SQL function, but just writing out the sub-SELECT
doesn't do it.  This goes back to the recent discussion of why SQL
functions can't always be inlined --- the semantics are a bit
different in some cases.

                        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

Reply via email to