Subject Re: [firebird-support] Re: Help with UDF functions
Author Bogusław Brandys
Photios Loupis (4T) wrote:
> Hi
> I have many grey hairs from going down the road of developing my own
> UDF library (mostly because of my impatience). I am not a expert on
> this subject at all but I have loaded a ZIP file of a library that
> works for us under extreme loads (1000+ inserts per minute sustained
> for 5-8 hours). Some of the functions in the library are not used
> anymore (for obvious reasons - have a look). The library
> demonstrates string (to a large degree) and date manipulation (to a
> small degree). Ihave had every conceivable problem whilst building
> this library and now it seems to 'behave'. The file is described as
> Firebird UDF Example Source Code
> If anyone has any suggestions on improving the source code (not
> removing ridiculous/obsolete functions) then please feel free to
> email me. Remember this library was written in my early introduction
> to this GREAT database system!
> One SMALL thing to remember using this library, all functions that
> return STRING data types must be declared in the UDF as By Reference
> Hope it helps....

Please don't 'top post' ;-)

Good poin !
FREE_IT is required in C/C++ UDF, but I suppose that when using Delphi
to create UDF You should avoid FREE_IT becouse Delphi uses own memory
manager for allocate/deallocate strings/pchars.
Btw: very important is also to define max input string value in UDF
definition for Firebird.

Bogusław Brandys