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

Function xml_send

src/backend/utils/adt/xml.c:419–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417
418
419Datum
420xml_send(PG_FUNCTION_ARGS)
421{
422 xmltype *x = PG_GETARG_XML_P(0);
423 char *outval;
424 StringInfoData buf;
425
426 /*
427 * xml_out_internal doesn't convert the encoding, it just prints the right
428 * declaration. pq_sendtext will do the conversion.
429 */
430 outval = xml_out_internal(x, pg_get_client_encoding());
431
432 pq_begintypsend(&buf);
433 pq_sendtext(&buf, outval, strlen(outval));
434 pfree(outval);
435 PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
436}
437
438
439#ifdef USE_LIBXML

Callers

nothing calls this directly

Calls 6

xml_out_internalFunction · 0.85
pg_get_client_encodingFunction · 0.85
pq_begintypsendFunction · 0.85
pq_sendtextFunction · 0.85
pq_endtypsendFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected