Re: PL/php in pg_pltemplate - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PL/php in pg_pltemplate
Date
Msg-id 20051126153746.GA31300@surnet.cl
Whole thread Raw
In response to Re: PL/php in pg_pltemplate  (Matteo Beccati <php@beccati.com>)
Responses Re: PL/php in pg_pltemplate
List 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.


pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: PL/php in pg_pltemplate
Next
From: Alvaro Herrera
Date:
Subject: Re: PL/php in pg_pltemplate