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

Function getFmtEncoding

src/fe_utils/string_utils.c:77–92  ·  view source on GitHub ↗

* Return the currently configured encoding for fmtId() and fmtQualifiedId(). */

Source from the content-addressed store, hash-verified

75 * Return the currently configured encoding for fmtId() and fmtQualifiedId().
76 */
77static int
78getFmtEncoding(void)
79{
80 if (fmtIdEncoding != -1)
81 return fmtIdEncoding;
82
83 /*
84 * In assertion builds it seems best to fail hard if the encoding was not
85 * set, to make it easier to find places with missing calls. But in
86 * production builds that seems like a bad idea, thus we instead just
87 * default to UTF-8.
88 */
89 Assert(fmtIdEncoding != -1);
90
91 return PG_UTF8;
92}
93
94/*
95 * Quotes input string if it's not a legitimate SQL identifier as-is.

Callers 2

fmtIdFunction · 0.85
fmtQualifiedIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected