Re: php with postgres

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: ivan <iv(at)psycho(dot)pl>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org, Marcus Börger <marcus(dot)boerger(at)t-online(dot)de>
Subject: Re: php with postgres
Date: 2003-07-13 17:02:44
Message-ID: 3F1190B4.30205@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck wrote:
> I had been briefly talking with Marcus Boerger (included in CC) from the
> PHP team about it. He knows the PHP5 SAPI embed well. Can you include
> him into the team (if not already)?

Sure!

> From what I know about this SAPI I think the PL/Tcl implementation
> would be a good point to start from, as it looks very similar with
> respect to the possibilities.

I was going to start from PL/R, which is a descendent of PL/Tcl --
reason being, in PL/R I've already got SRF/table-function support and
polymorphic argument/return-type support working. Also, I've done a fair
amount of work to preserve arrays and composite types as they move
back-and-forth.

My plan is to add a few missing things to PL/R over the next couple (or
so) weeks, and then start PL/PHP from that:
1) Cache lookup based on function oid and argument signature ala the
patch I recently sent in (and improved by Tom) for PL/pgSQL -- this
is needed to properly support polymorphic arguments.
2) Trigger support -- just haven't needed this so far, but we'll want it
in PL/PHP, so I may as well add it to PL/R too.
3) Re-add nested error handling -- I removed this from PL/R early on
just to simplify life. Should be easy to drop back in.

I've read some examples posted regarding the PHP embed SAPI, and it
looks very similar to the R interpreter also. It should be fairly easy
to drop the PHP embed calls in for the libR calls. The bulk of the work
will be in modifying the data conversion functions that map Postgres
composite types and arrays to similar structures in PHP.

Help on the PHP side of things would be most appreciated, because that's
the part I'm least familiar with.

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jenny - 2003-07-13 17:12:05 row level locks
Previous Message Jan Wieck 2003-07-13 11:22:09 Re: php with postgres