You could write the function to take an array of integers instead of a text string:CREATE OR REPLACE FUNCTION getlist(integer[]) RETURNS SETOF my_tbl as $$SELECT * FROM my_tblWHERE u_id = 0 OR u_id = ANY($1)$$ LANGUAGE SQL STABLE STRICT;SELECT * FROM getlist('{1,2,3}');Another way would be to bu
[Please don't use a blank subject. I've added a subject to this
message.]
On Mon, Jan 09, 2006 at 03:26:45PM -0800, Matthew Peter wrote:
> How come when I pass in a list in it doesn't use it as a list of
> integers? Do I need to somehow make $1 be interpreted as a list of
> ints? Rather than ju