Postgres Decode and convert_from error

Asked

Viewed 240 times

6

Has anyone been through the Postgres issue to error the Code Base64? I have the following call that informs [Err] ERROR: end of sequence is invalid

convert_from(decode('YnJhc2lsc2VtbGVp', 'base64'), 'UTF8')

Remembering where I am 'Ynjhc2lsc2vtbgvp' I’m using a variable, so it looks like this

convert_from(decode(variavel, 'base64'), 'UTF8')
  • Probably missed the == at the end of the sequence: convert_from(decode('YnJhc2lsc2VtbGVp==', 'base64'), 'UTF8')

  • @Jorgekania You talk about such a variavel but does not mention its type or content. This information is crucial for the understanding and explanation of your question.

1 answer

0

Situation resolved.

I converted the field to TEXT type and solved it.

  • 13

    Perhaps you could explain your answer a little better so you can help future visitors and even earn points for it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.