Subject Re: [firebird-support] FB 1.5 RC6: Cannot use rtrim multiple times in the same statement
Author Helen Borrie
At 10:51 AM 21/10/2003 +0000, you wrote:
>If I attempt to use the rtrim udf multiple times in the same
>statement as in
>this example
>
>select rtrim(rr.rdb$owner_name),
> rtrim(rr.rdb$relation_name)
> from rdb$relations rr
> where rr.rdb$system_flag = 0;
>
>then I will get this error
>
>Invalid token.
>invalid request BLR at offset 31.
>Implementation limit exceeded.
>block size exceeds implementation restriction.

That's because that UDF isn't implemented to pass 32Kb. You don't change
the internal parameters of UDF declarations. This is how it is and has to be:

DECLARE EXTERNAL FUNCTION rtrim
CSTRING(80)
RETURNS CSTRING(80) FREE_IT
ENTRY_POINT 'IB_UDF_rtrim' MODULE_NAME 'ib_udf';

The size of the internal parameter doesn't affect the size of what you pass
or get in return - as long as you don't pass a string longer than 32,767 bytes.

heLen