Re: IN vs equality (was Re: odd intermittent query hanging issue) - Mailing list pgsql-general

From Tom Lane
Subject Re: IN vs equality (was Re: odd intermittent query hanging issue)
Date
Msg-id 19656.1337527996@sss.pgh.pa.us
Whole thread Raw
In response to IN vs equality (was Re: odd intermittent query hanging issue)  (Chris Angelico <rosuav@gmail.com>)
List pgsql-general
Chris Angelico <rosuav@gmail.com> writes:
> On Sat, May 19, 2012 at 3:09 AM, Steve Crawford
> <scrawford@pinpointresearch.com> wrote:
>> I also don't understand the "xcrm.channel_id in (1)" instead of
>> "xcrm.channel_id = 1" unless this is a generated query and there could be
>> multiple ids in that condition.

> Side point from this thread. Is there ever any difference between
> these two constructs?

According to transformAExprIn() in parse_expr.c, no.

            regards, tom lane

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Libpq question
Next
From: Poul Møller Hansen
Date:
Subject: Re: Why are pg_restore taking that long ?