Re: IN Operator query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: DrYSG <ygutfreund(at)draper(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: IN Operator query
Date: 2012-07-05 14:44:37
Message-ID: 23785.1341499477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

DrYSG <ygutfreund(at)draper(dot)com> writes:
> My nave hope was that if iFILTER was set to: "CADRG, DTED1, DTED2, SRTF"
> (cat.type in (iFilter)) would expand to:
> (cat.type in (CADRG, DTED1, DTED2, SRTF))
> But that is not working.

Nope, it will not (and a good thing too IMO --- would you really want
commas in text strings to be dangerous?)

You might be able to do what you need by passing the argument as a text
array and using "cat.type = any(ifilter)".

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Swierczek 2012-07-05 14:48:07 Re: IN Operator query
Previous Message DrYSG 2012-07-05 14:31:58 IN Operator query