2012/11/27 Thomas Kellerer <spam_ea...@gmx.net>: > Pavel Stehule, 27.11.2012 13:26: > >>> My question is: why I cannot use regexp_matches() in the WHERE clause, >>> even >>> when the result is clearly an integer value? >>> >> >> use a ~ operator instead >> > > So that means, regexp_matches cannot be used as an expression in the WHERE
should not be used - it is designed to return matched values, no for returning true or false, you can do some obscure postgres=# select * from o where array(select (regexp_matches(a,'ne'))[1]) <> '{}'::text[]; a -------- zdenek (1 row) but it is not recommended. Regards Pavel > clause? > > > Regards > Thomas > > > > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql