[GENERAL] Can't get the field = ANY(array) clause to work...

2006-01-31 Thread nboutelier
Has anyone successfully used the "ANY", "ALL", or "SOME" clause using arrays? Cant seem to get this to work. Heres the gist of my function which returns a SETOF INTEGER[]... DECLARE id_var INTEGER[]; record_var RECORD; BEGIN id_var[0] := 1; id_var[1] := 2; id_var[2] := 3; FOR record_va

[GENERAL] Equivalent of a RECORD[] data type used in a function?

2006-02-01 Thread nboutelier
Is it possible to have a function variable hold a recordset? Kind of like this... DECLARE recordset_var RECORD[]; BEGIN recordset_var := (SELECT id FROM myTable); /* loop through a ton of different tables where column IN (recordset_var) */ END; Thanks for any help! -Nick -

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-02-01 Thread nboutelier
I set the array count to start at 1, but still not working. Im using v8. Ive also read that the ANY clause runs rediculously slow. Is there another way to convert an array into a record set without writing a separate function for that? Is it even possible to create a record set variable in a functi

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-02-02 Thread nboutelier
The problem was fixed by initializing the array before giving it a value. Not surprising Postges isnt as popular as it should be. I was by luck that I found this out - the manual says nothing about init arrays. DECLARE id_var INTEGER[]; record_var RECORD; BEGIN id_var := '{}'; id_var[0] :=

Re: [GENERAL] Equivalent of a RECORD[] data type used in a function?

2006-02-02 Thread nboutelier
Oracle keeps looking more and more appealing. $$$ vs actually being able to get stuff done? ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster