Re: decode, base64 problem
От | David G. Johnston |
---|---|
Тема | Re: decode, base64 problem |
Дата | |
Msg-id | CAKFQuwY1HbbdR8Jq5SSoR3B92UcqDe4PHjh0Y8pYRkMYjNt-Rg@mail.gmail.com обсуждение исходный текст |
Ответ на | decode, base64 problem (gmail Vladimir Koković <vladimir.kokovic@gmail.com>) |
Ответы |
Re: decode, base64 problem
|
Список | pgsql-novice |
On Fri, May 22, 2020 at 8:49 AM gmail Vladimir Koković <vladimir.kokovic@gmail.com> wrote:
Hi,
I don't know what this is about, so I could get from someone who knows more PostgreSQL than I do,
some rational explanation of what the problem is.
2 -------------------------------------------------------
select
substring(encode(lice,'base64'), 110, 5) as Lokal0,
length(substring(encode(lice,'base64'), 110, 5)) as Len05,decode(substring(encode(lice,'base64'), 110, 5),'base64') as Lokal0decode
from grupa002.ispp_partner
where obrisan=0 and maticnibroj=30643;ERROR: 22023: invalid end sequence
LOCATION: b64_decode, encode.c:327
My question is how to make a decode for a field for which encode text is known and the length is 5?
What makes you believe that you should be able to get a decoded result after you've corrupted the encoded data? You no longer have an encoded value, of any length, after doing substring - you now just have a sequence of five characters chosen from a subset of ASCII.
David J.
В списке pgsql-novice по дате отправления: