Re: user defined functions
От | nconway@klamath.dyndns.org (Neil Conway) |
---|---|
Тема | Re: user defined functions |
Дата | |
Msg-id | 20020627140008.GA26194@klamath.dyndns.org обсуждение исходный текст |
Ответ на | user defined functions ("Alison Stevenson" <as@it-innovation.soton.ac.uk>) |
Список | pgsql-general |
On Thu, Jun 27, 2002 at 09:44:08AM +0100, Alison Stevenson wrote: > Firstly, am I correct in thinking that user-defined functions cannot > be written in C++ or Java? (The FAQ gives C, SQL, PL/pgSQL, Tcl, > Perl, Python, or Ruby as the only possibilities) UDFs can be written in Java using http://pljava.sf.net. You can write UDFs in C++ -- as long as the single function you tell Postgres about (the "entry point" into the C++ code) is defined with C linkage (extern "C" { ... }). > Secondly what sort of SQL interface to the user defined functions > is available? For example if I defined a 'distance' function to > compare two feature_vectors stored as BLOBs can I call > t1.feature_vector.distance(t2.feature_vector) No -- you can call distance(t1.feature_vector, t2.feature_vector) though. Cheers, Neil -- Neil Conway <neilconway@rogers.com> PGP Key ID: DB3C29FC
В списке pgsql-general по дате отправления: