From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>, "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AW: Coping with 'C' vs 'newC' function language namesh |
Date: | 2000-11-17 18:57:37 |
Message-ID: | 20001117125737.D16272@rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Martin A. Marques | 2000-11-17 19:08:26 | Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL |
Previous Message | Peter Eisentraut | 2000-11-17 18:51:27 | Re: Varchar standard compliance |