Re: PL/php in pg_pltemplate

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Matteo Beccati <php(at)beccati(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, peter_e(at)gmx(dot)net, jd(at)commandprompt(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/php in pg_pltemplate
Date: 2005-11-26 15:37:46
Message-ID: 20051126153746.GA31300@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Matteo Beccati wrote:

> >The only sore point of the PL/php build is that it needs the Apache2
> >module, so it needs to know the path to it. I haven't found a way to do
> >this automatically without requiring APXS which I certainly don't want
> >to do ...
>
> Maybe I didn't get the point, but this could be as simple as writing a
> new PHP sapi (i.e. sapi/pgsql) which builds the .so without requiring
> Apache or other software.

Yeah, I've considered doing that; but PHP/Zend code is so ugly that I'd
want to stay as far away from it as possible. In the end, it's likely
that I'll need to write a whole new SAPI anyway. (Really the current
PL/php code is a sort of replacement for part of the Apache2 SAPI, so
maybe we're not that far from a complete SAPI.)

Oh, and the problem with building a new SAPI is that I'll need to have
PHP built in order to be able to install PL/php, so it's not as sexy as
just using the Apache2 SAPI which is very ubiquitous.

> I've also seen there is an experimental embed sapi which could already
> be what you need (--enable-embed).

Interesting. I'll explore this. Is this available in PHP5 only?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-11-26 15:41:41 Re: PL/php in pg_pltemplate
Previous Message Bruce Momjian 2005-11-26 15:08:40 Re: SHOW ALL output too wide