PostgreSQL decode()

Decode binary data from string previously encoded with encode. Parameter type is same as in encode.

Function

decode(string text, type text)

Parameters

text - The String to be decoded
text - Decoding type

Return value

bytea - Returns the Base64 decoded version of text.

Example

select decode('YmFzZTY0IGVuY29kZWQgc3RyaW5n', 'base64');
---------------------------
base64 encoded string

Github

See also: