select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / SYSTEM INFORMATION FUNCTIONS AND OPERATORS

pg_char_to_encoding

Read PG 18 manual ↗

Converts the supplied encoding name into an integer representing the internal identifier used in some system catalog tables.

Signatures & examples

pg_char_to_encoding ( encoding name ) → integer
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.
Version history 1
  1. PG 14 → 15added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source