Subject | RE: [firebird-support] How to declare UDF ? |
---|---|
Author | Michael Möhle |
Post date | 2007-04-20T14:00:03Z |
I think if you want to declare a function from shared lib fbudf.so then
you have to declare them with MODULE_NAME 'fbudf' and the right
ENTRY_POINT! e.g
declare external function addHour
timestamp, int
returns timestamp
entry_point 'addHour' module_name 'fbudf';
for the addHour UDF!
The functions SUBSTRING and LOWER are in the
ib_udf.so. This are old UDF from Interbase 6.0! Most
of them are included in FB 2.0.1 like SUBSTRING and LOWER.
Michael Möhle
Systemadministrator
Softwareentwickler
MBD-Team
Hausanschrift:
Möhle und Braker Datentechnik Gbr
24647 Ehndorf
Hinter dem Aalbek 16
Gesellschafter:
Michael Möhle
Rainer Braker
Peter Schmitz
Telefon: (04321) 6020-97
Telefax: (04321) 6020-98
eMail: m.moehle@...
Internet: www.mbd-team.de
-----Ursprüngliche Nachricht-----
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]Im Auftrag von Vince Ieraci
Gesendet: Freitag, 20. April 2007 13:18
An: firebird-support@yahoogroups.com
Betreff: [firebird-support] How to declare UDF ?
Hi,
I have FB installed on OpenSUSE 10.2.
I want to declare some UDF's from the /opt/firebird/UDF/fbudf.so
shared library.
Question is how do I declare the functions in FB ?
I tried copying some text from the .sql file and running it in a
command window (FlameRobin)
DECLARE EXTERNAL FUNCTION lower
CSTRING(255)
RETURNS CSTRING(255) FREE_IT
ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';
but I get the error message "Token Unknown" which is referring to
"lower".
Do I need to compile the .so file first ?
How do I go about this ?
Thanks,
you have to declare them with MODULE_NAME 'fbudf' and the right
ENTRY_POINT! e.g
declare external function addHour
timestamp, int
returns timestamp
entry_point 'addHour' module_name 'fbudf';
for the addHour UDF!
The functions SUBSTRING and LOWER are in the
ib_udf.so. This are old UDF from Interbase 6.0! Most
of them are included in FB 2.0.1 like SUBSTRING and LOWER.
Michael Möhle
Systemadministrator
Softwareentwickler
MBD-Team
Hausanschrift:
Möhle und Braker Datentechnik Gbr
24647 Ehndorf
Hinter dem Aalbek 16
Gesellschafter:
Michael Möhle
Rainer Braker
Peter Schmitz
Telefon: (04321) 6020-97
Telefax: (04321) 6020-98
eMail: m.moehle@...
Internet: www.mbd-team.de
-----Ursprüngliche Nachricht-----
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]Im Auftrag von Vince Ieraci
Gesendet: Freitag, 20. April 2007 13:18
An: firebird-support@yahoogroups.com
Betreff: [firebird-support] How to declare UDF ?
Hi,
I have FB installed on OpenSUSE 10.2.
I want to declare some UDF's from the /opt/firebird/UDF/fbudf.so
shared library.
Question is how do I declare the functions in FB ?
I tried copying some text from the .sql file and running it in a
command window (FlameRobin)
DECLARE EXTERNAL FUNCTION lower
CSTRING(255)
RETURNS CSTRING(255) FREE_IT
ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';
but I get the error message "Token Unknown" which is referring to
"lower".
Do I need to compile the .so file first ?
How do I go about this ?
Thanks,