Subject | Re: How to declare UDF ? |
---|---|
Author | Vince Ieraci |
Post date | 2007-04-20T14:42:42Z |
--- In firebird-support@yahoogroups.com, Michael Möhle <m.moehle@...>
wrote:
SUBSTRING was in fact working, I was calling it with SUBSTRING(text,x,y)
I see FB uses a different calling convention, SUBSTRING(text FROM x
FOR y) !!
Tried declaring the addHour function, and it worked just fine.
Thank you again.
wrote:
>OK, Thank you, I see my mistake.
> 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.
SUBSTRING was in fact working, I was calling it with SUBSTRING(text,x,y)
I see FB uses a different calling convention, SUBSTRING(text FROM x
FOR y) !!
Tried declaring the addHour function, and it worked just fine.
Thank you again.