Re: Converting string to IN query - Mailing list pgsql-general

From Andrus
Subject Re: Converting string to IN query
Date
Msg-id gadsb6$2v2d$1@news.hub.org
Whole thread Raw
In response to Converting string to IN query  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
I found that following query works:

create temp table test ( test int ) on commit drop;
insert into test values(1);
select * from test where test = ANY ( '{1,2}' );

Is this best solution ?

Will it work without causing stack overflow with 8.2 server  default
settings
if string contains some thousands numbers ?

I have found that IN (1,2,...) causes stack overflow in server if there are
large number of items in list.

Andrus.


pgsql-general by date:

Previous
From: btober@mail.ct.metrocast.net
Date:
Subject: pg_dumpall problem when roles have default schemas
Next
From: Simon Riggs
Date:
Subject: Re: PITR and base + full backups