argument of AND must not return a set when using regexp_matches - Mailing list pgsql-general

From Robert James
Subject argument of AND must not return a set when using regexp_matches
Date
Msg-id CAGYyBgiUSJ9AvwQ54zgbLi7-U9dDC3mmLXBvLuaGXCDPpVAu_w@mail.gmail.com
Whole thread Raw
Responses Re: argument of AND must not return a set when using regexp_matches
List pgsql-general
I've been getting a funny SQL error, which I've boiled down to this case.

SELECT (regexp_matches('abc', '(.)b(.)'))[1] IS NOT NULL
-- Returns true, as expected

SELECT (regexp_matches('abc', '(.)b(.)'))[1] IS NOT NULL AND true
-- Gives this error:
ERROR: argument of AND must not return a set
SQL state: 42804

Can anyone make heads or tails of it? Is it a real bug? Is there a work around?

Postgres 8.3


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Best method to compare subdomains
Next
From: "T. E. Lawrence"
Date:
Subject: Re: reducing number of ANDs speeds up query RESOLVED