problem with regexp_matches in nested funcion

From: Isaac Marco Blancas <isaac(dot)marco(at)udima(dot)es>
To: pgsql-sql(at)postgresql(dot)org
Subject: problem with regexp_matches in nested funcion
Date: 2015-09-22 09:00:07
Message-ID: CAA2CX-11muWiocVvH3MxYC-CJcmTgSKx0Zve+XhnuSZ6S82Aaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I get this error:

ERROR: functions and operators can take at most one set argument
SQL state: 0A000

When I run this:

select message as before,
replace(message,

array_to_string(regexp_matches(message,'\\$\\$.*?\\{tabular\\}.*?\\$\\$'),
'#'),

replace(array_to_string(regexp_matches(message,'\\$\\$.*?\\{tabular\\}.*?\\$\\$'),
'#'),'tabular','array')) as later
from mdl_forum_posts
where message ~ '\\$\\$.*?\\{tabular\\}.*?\\$\\$';

I know the problem is in the second array_to_string. Some idea?

Thanks.

--
Isaac Marco Blancas

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2015-09-22 12:36:33 problem with regexp_matches in nested funcion
Previous Message dave 2015-09-21 12:19:13 Re: Recursive merging of overlapping arrays in a column