Re: [PROPOSAL] UDF_Gen for MySQL UDF extensions
| From: | Hartmut Holzgraefe | Date: | Mon, 13 Oct 2003 14:31:15 +0000 |
| Subject: | Re: [PROPOSAL] UDF_Gen for MySQL UDF extensions | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22651@lists.php.net to get a copy of this message | ||
Alexey Borzov wrote:
I think that neither PostgreSQL, nor Oracle users have a terrible need for this feature,i don't know of any way to extend oracle with native functions from shared libraries (probably a lack of knowledge on my side) PostgreSQL has a similar extension mechanism but i haven't looked into it now
as they can use procedural languages for this.have a look at the TO_CHAR(date, format) implementation in the second example, you don't want to implement this in any of the stored procedure languages that i know of
PostgreSQL users may even use PL/PHP: http://www.commandprompt.com/entry.lxp?lxpe=294the TO_DATE example would be a nightmare to implement in PHP too due to the lack of decent parser generator tools (unless you implement it as a PHP extension first and then export this to PostgreSQL using PL/PHP) adding functions that are implemented in native code may make sense in two cases: 1) for performance reasons even if the same behaviour can be implemented using the procedural language provided by the database 2) the functionality can't be implemented using the procedure language due to language limitations or beause it needs functionality from another shared library
So unless the author of the package wishes to support any other database right now,the Postgres interface for adding native functions looks promissing, maybe it is possible to create both PostgreSQL and MySQL extensions from the same input file ... but this needs further investigation ...
I think the package name *should* have MySQL in it. If generic DB_UDF_Gen will be needed later, it can always be added. The name DB_UDF_Gen for the current package is IMO misleading.so for now it would be MySQL_UDF_Gen then ...? -- Hartmut Holzgraefe <hartmut@php.net>