Re: SELECT INTO Array?
От | Sean Davis |
---|---|
Тема | Re: SELECT INTO Array? |
Дата | |
Msg-id | 001b01c53780$aefd13d0$5179f345@WATSON обсуждение исходный текст |
Ответ на | SELECT INTO Array? ("Zitan Broth" <zitan@mediasculpt.net>) |
Список | pgsql-general |
----- Original Message ----- From: "Zitan Broth" <zitan@mediasculpt.net> To: "Michael Fuhr" <mike@fuhr.org> Cc: <pgsql-general@postgresql.org> Sent: Friday, April 01, 2005 9:00 PM Subject: Re: [GENERAL] SELECT INTO Array? > 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, I think other folks hinted at this before, but you might consider using pl/perl or pl/python for this. Array support and manipulation is more advanced in these languages than in pl/pgsql, at least for manipulation within the function. >
В списке pgsql-general по дате отправления: