Commit cff23842 authored by Peter Eisentraut's avatar Peter Eisentraut

Print bit values as binary strings (not hex)

parent 7852a355
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.11 2000/11/07 11:35:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.12 2000/11/16 21:43:28 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -177,6 +177,12 @@ zpbit_in(PG_FUNCTION_ARGS) ...@@ -177,6 +177,12 @@ zpbit_in(PG_FUNCTION_ARGS)
Datum Datum
zpbit_out(PG_FUNCTION_ARGS) zpbit_out(PG_FUNCTION_ARGS)
{ {
#if 1
/* same as varbit output */
return varbit_out(fcinfo);
#else
/* This is how one would print a hex string, in case someone wants to
write a formatting function. */
VarBit *s = PG_GETARG_VARBIT_P(0); VarBit *s = PG_GETARG_VARBIT_P(0);
char *result, char *result,
*r; *r;
...@@ -207,6 +213,7 @@ zpbit_out(PG_FUNCTION_ARGS) ...@@ -207,6 +213,7 @@ zpbit_out(PG_FUNCTION_ARGS)
*r = '\0'; *r = '\0';
PG_RETURN_CSTRING(result); PG_RETURN_CSTRING(result);
#endif
} }
/* zpbit() /* zpbit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment