Encode/decode a base64 encoded string in PostGreSQL