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

Function quote_object_name

contrib/sepgsql/label.c:651–689  ·  view source on GitHub ↗

* quote_object_name * * It tries to quote the supplied identifiers */

Source from the content-addressed store, hash-verified

649 * It tries to quote the supplied identifiers
650 */
651static char *
652quote_object_name(const char *src1, const char *src2,
653 const char *src3, const char *src4)
654{
655 StringInfoData result;
656 const char *temp;
657
658 initStringInfo(&result);
659
660 if (src1)
661 {
662 temp = quote_identifier(src1);
663 appendStringInfoString(&result, temp);
664 if (src1 != temp)
665 pfree((void *) temp);
666 }
667 if (src2)
668 {
669 temp = quote_identifier(src2);
670 appendStringInfo(&result, ".%s", temp);
671 if (src2 != temp)
672 pfree((void *) temp);
673 }
674 if (src3)
675 {
676 temp = quote_identifier(src3);
677 appendStringInfo(&result, ".%s", temp);
678 if (src3 != temp)
679 pfree((void *) temp);
680 }
681 if (src4)
682 {
683 temp = quote_identifier(src4);
684 appendStringInfo(&result, ".%s", temp);
685 if (src4 != temp)
686 pfree((void *) temp);
687 }
688 return result.data;
689}
690
691/*
692 * exec_object_restorecon

Callers 1

exec_object_restoreconFunction · 0.85

Calls 5

initStringInfoFunction · 0.85
appendStringInfoStringFunction · 0.85
appendStringInfoFunction · 0.85
quote_identifierFunction · 0.50
pfreeFunction · 0.50

Tested by

no test coverage detected