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

Commitb64a754

Browse files
committed
From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
For substr() and substring() on the text data type, the relevant code is invarlena.c. You are right, there is a problem. I have a patch which I willapply to the source tree soon. The copy enclosed below probably does notpreserve tabs correctly so cannot be applied directly; the relevant changeis simply changing the ">=" to ">"...
1 parent6ac2528 commitb64a754

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.31 1998/02/26 04:37:24 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.32 1998/03/15 08:07:01 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -291,7 +291,7 @@ text_substr(text *string, int32 m, int32 n)
291291
len=VARSIZE(string)-VARHDRSZ;
292292

293293
/* m will now become a zero-based starting position */
294-
if (m >=len)
294+
if (m>len)
295295
{
296296
m=0;
297297
n=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp