BUG #2889: Syntax error: WHERE ANY(arrayfield) = N

From: "David" <higgsd(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2889: Syntax error: WHERE ANY(arrayfield) = N
Date: 2007-01-13 05:49:28
Message-ID: 200701130549.l0D5nSZl054595@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2889
Logged by: David
Email address: higgsd(at)gmail(dot)com
PostgreSQL version: 8.1.5
Operating system: OpenBSD 3.9
Description: Syntax error: WHERE ANY(arrayfield) = N
Details:

In reference to the array documentation at:
http://www.postgresql.org/docs/8.1/static/arrays.html#AEN5698

This statement works:
=> SELECT * FROM sal_emp WHERE 10000 = ANY (pay_by_quarter);

But this does not:
=> SELECT * FROM sal_emp WHERE ANY (pay_by_quarter) = 10000;
ERROR: syntax error at or near "ANY" at character ...

The ANY operator has the same problem, others may as well.

While trivial to work around, it is certainly annoying and I can't think of
a good reason why it shouldn't work either way.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-01-13 18:46:15 Re: BUG #2889: Syntax error: WHERE ANY(arrayfield) = N
Previous Message Tom Lane 2007-01-13 03:21:28 Re: BUG #2885: to_char function