Re: PL/Perl returning multiple rows - Mailing list pgsql-general

From Christopher Murtagh
Subject Re: PL/Perl returning multiple rows
Date
Msg-id 1068523030.13572.45.camel@mafalda.murtagh.name
Whole thread Raw
In response to Re: PL/Perl returning multiple rows  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: PL/Perl returning multiple rows  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: PL/Perl returning multiple rows  (Joe Conway <mail@joeconway.com>)
List pgsql-general
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
--
Christopher Murtagh
Enterprise Systems Administrator
ISR / Web Communications Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax:  (514) 398-2017

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PL/Perl returning multiple rows
Next
From: "Joshua D. Drake"
Date:
Subject: Re: PL/Perl returning multiple rows