> then you try get substr, which consists only of last char in string
> you get all string
>
> For example:
> userbase=> select substr('123456', 6,1) ;
> substr
> ------
> 123456
> (1 row)
>
From Edmund Mergl <E.Mergl@bawue.de>
/*
* Edmund Mergl <E.Mergl@bawue.de>
*
- * $Id: oracle_compat.c,v 1.10 1997/09/08 21:48:39 momjian Exp $
+ * $Id: oracle_compat.c,v 1.11 1998/01/13 03:49:51 scrappy Exp $
*
*/
if ((string == (text *) NULL) ||
(m <= 0) || (n <= 0) ||
- ((len = VARSIZE(string) - VARHDRSZ - m) <= 0))
+ ((len = VARSIZE(string) - VARHDRSZ - m + 1) <= 0))
return string;
len = len + 1 < n ? len + 1 : n;