pgsql-bugs(at)postgresql(dot)org writes:
> Why doesnt working the following SQL command ?
> database=# SELECT EXISTS (SELECT 1 UNION SELECT 2);
> ERROR: parser: parse error at or near "union"
You're using an old release of Postgres. Update. (7.1.3 is current.)
I don't know about your other complaint; you didn't give enough detail.
regards, tom lane