Syntax question - compound value comparisons

From: Richard Huxton <dev(at)archonet(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Syntax question - compound value comparisons
Date: 2004-04-15 18:54:12
Message-ID: 200404151954.12530.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I can do this:

SELECT * FROM library_items WHERE (li_lib, li_item) = (11080,123063);
li_lib | li_item
--------+---------
11080 | 123063

But not this:

SELECT * FROM library_items WHERE (li_lib, li_item) IN ( (11080,123063),
(11081, 122250) );
ERROR: syntax error at or near "11080" at character 59

Is this just a parser weakness (in which case, can I ask someone in core for a
TODO - tia) or is there some subtle reason why it isn't supposed to work.

--
Richard Huxton
Archonet Ltd

Browse pgsql-general by date

  From Date Subject
Next Message wilbur douma 2004-04-15 20:14:15 Postgresql system requirements to support large databases.
Previous Message Andrew Ayers 2004-04-15 18:47:27 Re: Basix for Data General / Basix for Sco Unix