We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf4ad01 commit 0edf928Copy full SHA for 0edf928
src/backend/utils/adt/varbit.c
@@ -9,7 +9,7 @@
9
* Portions Copyright (c) 1994, Regents of the University of California
10
*
11
* IDENTIFICATION
12
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.13 2000/11/18 16:18:41 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.14 2000/11/22 13:35:35 petere Exp $
13
14
*-------------------------------------------------------------------------
15
*/
@@ -764,6 +764,9 @@ bitsubstr(PG_FUNCTION_ARGS)
764
*ps;
765
766
bitlen = VARBITLEN(arg);
767
+ /* If we do not have an upper bound, set bitlen */
768
+ if (l==-1)
769
+ l = bitlen;
770
e = s + l;
771
s1 = Max(s, 1);
772
e1 = Min(e, bitlen + 1);
0 commit comments