↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / Binary String Functions And Operators

Converts a binary string representing text in encoding src_encoding to a binary string in encoding dest_encoding (see Section 23.3.4 for available conversions).

Reading PG 18current·documented in 26 of 27 versions, 7.2 to 20

Signatures & examples

convert ( bytes bytea, src_encoding name, dest_encoding name ) → bytea
Converts a binary string representing text in encoding src_encoding to a binary string in encoding dest_encoding (see Section 23.3.4 for available conversions).
convert('text_in_utf8', 'UTF8', 'LATIN1') → \x746578745f696e5f75746638
Version history 12
  1. 16 → 17 changed
  2. 13 → 14 changed
  3. 12 → 13 changed
  4. 11 → 12 changed
  5. 9.6 → 10 changed
  6. 9.5 → 9.6 changed
  7. 8.4 → 9.0 changed
  8. 8.2 → 8.3 changed
  9. 7.4 → 8.0 changed
  10. 7.3 → 7.4 changed
  11. 7.2 → 7.3 changed
  12. 7.1 → 7.2 added

Definition snapshot: b7bd9cda · English manual source