diff options
Diffstat (limited to 'src/backend/utils/adt/tsgistidx.c')
-rw-r--r-- | src/backend/utils/adt/tsgistidx.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/utils/adt/tsgistidx.c b/src/backend/utils/adt/tsgistidx.c index 12a4111e99a..273f9b09253 100644 --- a/src/backend/utils/adt/tsgistidx.c +++ b/src/backend/utils/adt/tsgistidx.c @@ -115,10 +115,15 @@ gtsvectorout(PG_FUNCTION_ARGS) sprintf(outbuf, ARROUTSTR, (int) ARRNELEM(key)); else { - int siglen = GETSIGLEN(key); - int cnttrue = (ISALLTRUE(key)) ? SIGLENBIT(siglen) : sizebitvec(GETSIGN(key), siglen); + if (ISALLTRUE(key)) + sprintf(outbuf, "all true bits"); + else + { + int siglen = GETSIGLEN(key); + int cnttrue = sizebitvec(GETSIGN(key), siglen); - sprintf(outbuf, SINGOUTSTR, cnttrue, (int) SIGLENBIT(siglen) - cnttrue); + sprintf(outbuf, SINGOUTSTR, cnttrue, (int) SIGLENBIT(siglen) - cnttrue); + } } PG_FREE_IF_COPY(key, 0); |