Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cff2384

Browse files
committed
Print bit values as binary strings (not hex)
1 parent 7852a35 commit cff2384

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/backend/utils/adt/varbit.c

+8-1
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.11 2000/11/07 11:35:16 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.12 2000/11/16 21:43:28 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -177,6 +177,12 @@ zpbit_in(PG_FUNCTION_ARGS)
177177
Datum
178178
zpbit_out(PG_FUNCTION_ARGS)
179179
{
180+
#if 1
181+
/* same as varbit output */
182+
return varbit_out(fcinfo);
183+
#else
184+
/* This is how one would print a hex string, in case someone wants to
185+
write a formatting function. */
180186
VarBit *s = PG_GETARG_VARBIT_P(0);
181187
char *result,
182188
*r;
@@ -207,6 +213,7 @@ zpbit_out(PG_FUNCTION_ARGS)
207213
*r = '\0';
208214

209215
PG_RETURN_CSTRING(result);
216+
#endif
210217
}
211218

212219
/* zpbit()

0 commit comments

Comments
 (0)