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

Function pg_encoding_max_length

src/common/wchar.c:2025–2037  ·  view source on GitHub ↗

* fetch maximum length of a given encoding */

Source from the content-addressed store, hash-verified

2023 * fetch maximum length of a given encoding
2024 */
2025int
2026pg_encoding_max_length(int encoding)
2027{
2028 Assert(PG_VALID_ENCODING(encoding));
2029
2030 /*
2031 * Check for the encoding despite the assert, due to some mingw versions
2032 * otherwise issuing bogus warnings.
2033 */
2034 return PG_VALID_ENCODING(encoding) ?
2035 pg_wchar_table[encoding].maxmblen :
2036 pg_wchar_table[PG_SQL_ASCII].maxmblen;
2037}

Callers 9

asciiFunction · 0.85
chrFunction · 0.85
type_maximum_sizeFunction · 0.85
pg_encoding_mbcliplenFunction · 0.85
pg_verify_mbstr_lenFunction · 0.85
CopyConvertBufFunction · 0.85
test_enc_setupFunction · 0.85
pg_encoding_set_invalidFunction · 0.85
reportErrorPositionFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_enc_setupFunction · 0.68