Re: php with postgres - Mailing list pgsql-hackers

From marcus.boerger@t-online.de (Marcus Börger)
Subject Re: php with postgres
Date
Msg-id 463402472.20030714233100@post.rwth-aachen.de
Whole thread Raw
In response to Re: php with postgres  (ivan <iv@psycho.pl>)
Responses Re: php with postgres  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Hello ivan,

Sunday, July 13, 2003, 10:12:43 PM, you wrote:


i> what aoubt stream ?
i> in plpgsql you can just write command INSERT ... or DELETE
i> if you want sht like this in php you need to correct zend i think .
i> in php all var is declared as variant type but we need look at realy type.

In php we only have a few base types (int, float, bool, string) and some more
complex types like array and objects. The general idea is that at least the
base types can be converted without notice. This might be a problem when
integrating php into postgres but i guess everything can be solved the php
way. Since i also have zend commit rights i could fix things in this manner as
long as the language itself doesn't change in any way.

i> I have other view, to first write php interpreter to postgres, and then
i> write a translator, which translate plphp code to C code . I cound be only
i> a another way, to remember about speed (compiled code is always faster
i> then src ) . Php source will be to testing, and to relese will be option
i> to translate this src to C src and then compile it.

The general idea should be to leave php as is. That is, it is an interpreter.
During LT we were again able to speed it up very much. So performance
difference from interpreter to a real php to c compiler shouldn't be a problem
for the moment.
Also i thing when someone consideres using php inside his database he a) does
it because he doesn't know any other language or b) he uses very advanced
language features. In both cases the performance problem is no issue.
Additionally there are already tokenizers out which remove the
compile step. So atm we only can't get rid of the interpreter overhead.

Best regards,Marcus                            mailto:marcus.boerger@post.rwth-aachen.de



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Missing array support
Next
From: Andrew Biagioni
Date:
Subject: Re: [ADMIN] problems with pg_restore