Re: [GENERAL] Using ANY()

2009-06-08 Thread Shakil Shaikh
-- From: "Jeff Davis" On Sun, 2009-06-07 at 19:33 +0100, Shakil Shaikh wrote: A less trivial usage of the above would be to pass an array to a simple function using it to return a range of arbitrary rows. I don't know exactly what you mean by

Re: [GENERAL] Using ANY()

2009-06-08 Thread Jeff Davis
On Sun, 2009-06-07 at 19:33 +0100, Shakil Shaikh wrote: > Hi all, > > Is it appropriate to use ANY() in a select statement as so? > > SELECT * FROM table t WHERE t.id = ANY(ARRAY[1,2,3]); Yes, that's appropriate. A simpler formulation (for that simple case) is: ... WHERE t.id IN (1,2,3) >

[GENERAL] Using ANY()

2009-06-07 Thread Shakil Shaikh
Hi all, Is it appropriate to use ANY() in a select statement as so? SELECT * FROM table t WHERE t.id = ANY(ARRAY[1,2,3]); A less trivial usage of the above would be to pass an array to a simple function using it to return a range of arbitrary rows. The alternative to this would be to (program