Re: IN Operator query - Mailing list pgsql-novice

From Tom Lane
Subject Re: IN Operator query
Date
Msg-id 23785.1341499477@sss.pgh.pa.us
Whole thread Raw
In response to IN Operator query  (DrYSG <ygutfreund@draper.com>)
List pgsql-novice
DrYSG <ygutfreund@draper.com> writes:
> My naïve 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

pgsql-novice by date:

Previous
From: DrYSG
Date:
Subject: IN Operator query
Next
From: Michael Swierczek
Date:
Subject: Re: IN Operator query