Re: PL/Perl returning multiple rows

From: Joe Conway <mail(at)joeconway(dot)com>
To: Christopher Murtagh <christopher(dot)murtagh(at)mcgill(dot)ca>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, 'PostgreSQL General' <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/Perl returning multiple rows
Date: 2003-11-11 05:07:28
Message-ID: 3FB06E90.501@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christopher Murtagh wrote:
> On Mon, 2003-11-10 at 21:11, Joshua D. Drake wrote:
>
>>The fact that it is pl/pgSQL? Seriously though, I think that pl/pgSQL is
>>counter intuitive to some people and those of us who are coming from say a Perl
>>background are going to be much more proficient in using pl/Perl then having
>>to learn YET another language.
>
> Thanks for all the feedback. I've written a bunch of triggers in
> pl/pgsql and it wasn't the worst thing. The reason why I was thinking
> pl/perl is because my perl function needs to make a system call (to
> htDig actually) and extract integers from URLs that htDig give it.
>
> I know I could write this in Perl with my eyes closed, but I'm not so
> sure how I would do this with pgSQL. Can you even make pl/pgSQL
> 'untrusted' to make syscalls?

Write a Pl/Perl function that just does the syscall, and call it from
PL/pgSQL. Similarly for complex string parsing, etc.

HTH,

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2003-11-11 05:07:57 Re: PL/Perl returning multiple rows
Previous Message Christopher Murtagh 2003-11-11 04:58:41 Re: PL/Perl returning multiple rows