↑↓ 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

Encodes binary data into a textual representation; supported format values are: base64, escape, hex.

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

Signatures & examples

encode ( bytes bytea, format text ) → text
Encodes binary data into a textual representation; supported format values are: base64, escape, hex.
encode('123\000\001', 'base64') → MTIzAAE=
Version history 6
  1. 18 → 19 changed
  2. 12 → 13 changed
  3. 8.3 → 8.4 changed
  4. 8.1 → 8.2 changed
  5. 7.2 → 7.3 changed
  6. 7.1 → 7.2 added

Definition snapshot: b7bd9cda · English manual source