commit b8617bc6e6ca551ce51d661de10e6d3830e80694 Author: Ian Barwick Date: Wed Jul 14 12:44:58 2021 +0900 document pg_encoding_to_char() and pg_char_to_encoding() diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 0f5d25b948..1ee07854ed 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2819,7 +2819,8 @@ SCRAM-SHA-256$<iteration count>:&l conforencoding int4 - Source encoding ID + Source encoding ID (pg_encoding_to_char() + can translate this number to the encoding name) @@ -2828,7 +2829,8 @@ SCRAM-SHA-256$<iteration count>:&l contoencoding int4 - Destination encoding ID + Destination encoding ID (pg_encoding_to_char() + can translate this number to the encoding name) @@ -2927,7 +2929,7 @@ SCRAM-SHA-256$<iteration count>:&l Character encoding for this database - (pg_encoding_to_char() can translate + (pg_encoding_to_char() can translate this number to the encoding name) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6388385edc..af0488fed7 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -22987,6 +22987,36 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); + + + + pg_char_to_encoding + + pg_char_to_encoding ( encoding name ) + int + + + Converts the supplied encoding name into an integer representing the + internal identifier used in some system catalog tables. + Returns -1 if an unknown encoding name is provided. + + + + + + + pg_encoding_to_char + + pg_encoding_to_char ( encoding int ) + name + + + Converts the integer used as the internal identifier of an encoding in some + system catalog tables into a human-readable string. + Returns an empty string if an invalid encoding number is provided. + + +