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

Commit0edf928

Browse files
committed
Fix for bitsubstr when third argument is missing (i.e., -1).
From Adriaan Joubert <a.joubert@albourne.com>
1 parentcf4ad01 commit0edf928

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.13 2000/11/18 16:18:41 petere Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.14 2000/11/22 13:35:35 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -764,6 +764,9 @@ bitsubstr(PG_FUNCTION_ARGS)
764764
*ps;
765765

766766
bitlen=VARBITLEN(arg);
767+
/* If we do not have an upper bound, set bitlen */
768+
if (l==-1)
769+
l=bitlen;
767770
e=s+l;
768771
s1=Max(s,1);
769772
e1=Min(e,bitlen+1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp