8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

porting changes made to fb1.

This commit is contained in:
skywalker 2002-06-29 16:38:29 +00:00
parent f200813fda
commit bd1ef4742c

View File

@ -15,10 +15,12 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* $Id: ib_udf.sql,v 1.2 2001-12-24 02:50:48 tamlin Exp $
* $Id: ib_udf.sql,v 1.3 2002-06-29 16:38:29 skywalker Exp $
* Revision 1.2 2000/11/28 06:47:52 fsg
* Changed declaration of ascii_char in ib_udf.sql
* to get correct result as proposed by Claudio Valderrama
* 2001.5.19 Claudio Valderrama, add the declaration of alternative
* substrlen function to handle string,start,length instead.
*
*/
/*****************************************
@ -540,6 +542,9 @@ DECLARE EXTERNAL FUNCTION sqrt
* rather, it can use as long as 32767
* characters which is the limit on an
* INTERBASE character string.
* Change by Claudio Valderrama: when n>length(s),
* the result will be the original string instead
* of NULL as it was originally designed.
*
*****************************************/
DECLARE EXTERNAL FUNCTION substr
@ -547,6 +552,28 @@ DECLARE EXTERNAL FUNCTION substr
RETURNS CSTRING(80) FREE_IT
ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
/*****************************************
*
* s u b s t r l e n
*
*****************************************
*
* Functional description:
* substr(s,i,l) returns the substring
* of s which starts at position i and
* ends at position i+l-1, being l the length.
* Note: This function is NOT limited to
* receiving and returning only 80 characters,
* rather, it can use as long as 32767
* characters which is the limit on an
* INTERBASE character string.
*
*****************************************/
DECLARE EXTERNAL FUNCTION substrlen
CSTRING(80), SMALLINT, SMALLINT
RETURNS CSTRING(80) FREE_IT
ENTRY_POINT 'IB_UDF_substrlen' MODULE_NAME 'ib_udf';
/*****************************************
*
* s t r l e n