Re: Converting string to IN query

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Converting string to IN query
Date: 2008-09-12 13:54:49
Message-ID: gadsb6$2v2d$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message André Volpato 2008-09-12 14:05:42 Re: Converting string to IN query
Previous Message Jack Orenstein 2008-09-12 13:52:29 Re: Autocommit, isolation level, and vacuum behavior