Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0445dc

Browse files
committed
> It seems there is a mistake in substr function:
> 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>
1 parentfc79509 commitf0445dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/oracle_compat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
*Edmund Mergl <E.Mergl@bawue.de>
33
*
4-
*$Id: oracle_compat.c,v 1.10 1997/09/08 21:48:39 momjian Exp $
4+
*$Id: oracle_compat.c,v 1.11 1998/01/13 03:49:51 scrappy Exp $
55
*
66
*/
77

@@ -512,7 +512,7 @@ substr(text *string, int4 m, int4 n)
512512

513513
if ((string== (text*)NULL)||
514514
(m <=0)|| (n <=0)||
515-
((len=VARSIZE(string)-VARHDRSZ-m) <=0))
515+
((len=VARSIZE(string)-VARHDRSZ-m+1) <=0))
516516
returnstring;
517517

518518
len=len+1<n ?len+1 :n;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp