Re: OR or IN ? - Mailing list pgsql-general

From Andrus
Subject Re: OR or IN ?
Date
Msg-id 6F0EBD72DC61423EB7ACDE711A2E1DE0@andrusnotebook
Whole thread Raw
In response to Re: OR or IN ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>> No.  I need to support 8.0.
>> After those crashes I changed all IN clauses to
>> docid = ANY ({1,2,3,4,5,7,8,96,5445,.., 34534534})
>
> I'm afraid that hardly counts as "supporting" 8.0 (or 8.1 for that
> matter).  The syntax may work but it can't be indexed.

I'm sorry. It seems that Richard Huxton suggestion in this mailing list

SELECT * FROM generate_series(1,10) s
WHERE s = ANY (string_to_array('1,3,5,7', ',')::int[]);

works in 8.0
I hope that this works as well as new array syntax.

Andrus.

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Drop database / database in use question
Next
From: Tom Lane
Date:
Subject: Re: VACUUM PANIC: corrupted item pointer