On Wed, 2 Oct 2002, Jean-Christian Imbeault wrote:
> Is there an efficient way to get a count of the number of rows returned
> by this kind of query?
>
> select id from products where name ILIKE 'TNT' UNION select id from
> products where name ILIKE 'ATOM' UNION select id from products where
> name ILIKE 'BOB'
Probably "select count(*) from (select id from ... ) as t"
should work.