Hi Michael, Good question :-)
I am writing a function that has a row of data passed into it as variables and an ID. The function needs to pull out the appropriate row of data and compare each data item which those passed in. For each found difference a log row is written somewhere else and if there are *any* differences the whole row is updated. I was building an array from the passed in parameters with ||, then I wanted to build an array from a query (with SELECT INTO) and then compare each value with a loop: FOR i IN 1..17 LOOP -- compare current with new data if CurrentData[i] is not NewData[i] then ChangeFound := true; -- load change into log table Make sense? Thanks again, G. ----- Original Message ----- From: "Michael Fuhr" <[EMAIL PROTECTED]> To: "Zitan Broth" <[EMAIL PROTECTED]> Cc: <pgsql-general@postgresql.org> Sent: Saturday, April 02, 2005 12:57 PM Subject: Re: [GENERAL] SELECT INTO Array? > On Sat, Apr 02, 2005 at 12:29:15PM +1200, Zitan Broth wrote: > > > > Basically I am selecting out "one row" from the database with multiple > > columns (should have told you that earlier) so it seems that unfortunately > > your elegant approach below might not work. Although some of the columns > > are text and some numeric I was planning to load them all into strings. > > Perhaps I could convert the output to strings on the fly or something? > > What are you trying to do? That is, what's the ultimate purpose > of building the array? It might be easier to make suggestions if > we knew the "what" rather than focusing on a particular "how." > > -- > Michael Fuhr > http://www.fuhr.org/~mfuhr/ > ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly