Re: IN vs equality (was Re: odd intermittent query hanging issue)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Angelico <rosuav(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: IN vs equality (was Re: odd intermittent query hanging issue)
Date: 2012-05-20 15:33:16
Message-ID: 19656.1337527996@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Angelico <rosuav(at)gmail(dot)com> writes:
> On Sat, May 19, 2012 at 3:09 AM, Steve Crawford
> <scrawford(at)pinpointresearch(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Poul Møller Hansen 2012-05-20 15:39:31 Re: Why are pg_restore taking that long ?
Previous Message Martijn van Oosterhout 2012-05-20 13:53:54 Re: Libpq question