Re: PL/Perl returning multiple rows

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

Hello,

If you can code in Perl then pl/C wouldn't be a deep jump.

J

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?
>
> Basically, what I'm doing is using htDig to index and search text
>objects within Postgres. I spent a lot of time trying to get GiST and
>tsearch to work, but the lack of documentation and complexity of it made
>it impossible. Plus, htDig already has features that allow it to ignore
>HTML, phrase searching as well as fuzzy logic for lexemes, soudex and
>whatnot. We donated a G4 (and hopefully more soon) to the htDig team to
>help get 3.2 out of beta, and it is paying off big time. Here's a
>prototype of one component of the search engine:
>
> http://newfind.mcgill.ca/ads/
>
>which basically is an index of:
>
> http://www.mcgill.ca/classified/
>
> That search tool works well, but it is a PHP wrapper/hack. I would much
>rather do it at the DB level rather than PHP as it makes it a much more
>powerful tool. If I had a month or two, I would take the htDig source
>and make it a Postgres plugin, but unfortunately I don't.
>
> The worst part of this is that I have about two days to finish building
>this. :-(
>
> So, perhaps I should stick with Perl for now, and hope that with a real
>SPI, the speed will improve significantly. Someone mentioned earlier
>that there is an experimental SPI... just how experimental exactly?
>Segfault and die or less dangerous?
>
> Thanks again for all the feedback. I'd be happy for any more thoughts
>and ideas.
>
>Cheers,
>
>Chris
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-222-2783 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Fonnesbeck 2003-11-11 04:29:28 psql version mismatch
Previous Message Christopher Murtagh 2003-11-11 03:57:11 Re: PL/Perl returning multiple rows