Re: plperl & sort
От | Jeff |
---|---|
Тема | Re: plperl & sort |
Дата | |
Msg-id | 45A1A6B4-4BAD-4394-9F31-F477A8F1FCE3@torgo.978.org обсуждение исходный текст |
Ответ на | Re: plperl & sort ("Alex Hunsaker" <badalex@gmail.com>) |
Список | pgsql-bugs |
On Nov 4, 2008, at 2:27 PM, Alex Hunsaker wrote: > On Tue, Nov 4, 2008 at 09:02, Jeff <threshar@torgo.978.org> wrote: >> I've ran into this interesting problem. >> It seems that while you can call sort() in a trusted plperl func >> you cannot >> access $a & $b which effectively makes it useless. > > Hrm works for me if I take out the elog from sort() > I came across this because I was attempting to sort some data (an array of hashrefs) in to reverse order and got very odd results.. some elogging showed $a and $b were not what they should have been and after more and more digging I was able to widdle it down to the simple case I posted. When I tried having it call a sub instead of an anonymous block it would complain the sub didn't exist. (I have other plperl functions that have subs declared and they all work fine, but I never used them with sort before). I'll have some more time to tinker with it tomorrow. I'm reasonably sure its got something to do with the Safe module and some magic-fu we may need. Looking at plperl we do allow sort so I'm not sure why $a & $b disappear.. -- Jeff Trout <jeff@jefftrout.com> http://www.stuarthamm.net/ http://www.dellsmartexitin.com/
В списке pgsql-bugs по дате отправления: