MCPcopy Create free account
hub / github.com/apache/cloudberry / bqarr_out

Function bqarr_out

contrib/intarray/_int_bool.c:640–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638
639
640Datum
641bqarr_out(PG_FUNCTION_ARGS)
642{
643 QUERYTYPE *query = PG_GETARG_QUERYTYPE_P(0);
644 INFIX nrm;
645
646 if (query->size == 0)
647 ereport(ERROR,
648 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
649 errmsg("empty query")));
650
651 nrm.curpol = GETQUERY(query) + query->size - 1;
652 nrm.buflen = 32;
653 nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen);
654 *(nrm.cur) = '\0';
655 infix(&nrm, true);
656
657 PG_FREE_IF_COPY(query, 0);
658 PG_RETURN_POINTER(nrm.buf);
659}
660
661
662/* Useless old "debugging" function for a fundamentally wrong algorithm */

Callers

nothing calls this directly

Calls 4

infixFunction · 0.70
errcodeFunction · 0.50
errmsgFunction · 0.50
pallocFunction · 0.50

Tested by

no test coverage detected