Re: AW: Coping with 'C' vs 'newC' function language namesh
От | Ross J. Reedstrom |
---|---|
Тема | Re: AW: Coping with 'C' vs 'newC' function language namesh |
Дата | |
Msg-id | 20001117125737.D16272@rice.edu обсуждение исходный текст |
Ответ на | Re: AW: Coping with 'C' vs 'newC' function language namesh (Philip Warner <pjw@rhyme.com.au>) |
Список | pgsql-hackers |
On Fri, Nov 17, 2000 at 09:43:28PM +1100, Philip Warner wrote: > At 10:39 16/11/00 +0100, Zeugswetter Andreas SB wrote: > > > >Has anybody had time to look at how this is done in DB/2, Oracle ? Philip ? > > > > Don't know about Oracle or DB2, but Dec/RDB has: > Well, I don't know 'nuthing about Oracle, but I _did_ sign up for the OTN web site some time ago, specifically to get at Oracle docs. ;-) After clicking around there for a bit I came up with this, which is my interpretation of a 'flowchart' style language diagram: CREATE [OR REPLACE] FUNCTION [<schema>.]<name> [( <argument1> [IN|OUT|IN OUT] [NOCOPY] <datatype1> [, <...>] )] RETURN<datatype> [{AUTHID {CURRENT_USER|DEFINER} | DETERMINISTIC | PARALLEL_ENABLE} <...>] {IS|AS} { <pl/sql_function_body>| LANGUAGE {JAVA NAME '<java_method_name>'| C [NAME <c_func_name>] LIBRARY<lib_name> [WITH CONTEXT] [PARAMETERS (...)] } } The actual filesystem path to the DLL or .so is defined with a CREATE LIBRARY command. The WITH CONTEXT bit is a pointer to an opaque structure that the underlying function is supposed to pass on to service routines it might call, for their use. It seems the parameters can be defined either in place with the name, or with the PARAMETERS keyword. Philip's comments about this directly calling into a C shared library seem to apply, as well. Ross -- Open source code is like a natural resource, it's the result of providing food and sunshine to programmers, and then staying out of their way. [...] [It] is not going away because it has utility for both the developers and users independent of economic motivations. Jim Flynn, Sunnyvale, Calif.
В списке pgsql-hackers по дате отправления: