Re: chr(3) and 3::text
От | David G. Johnston |
---|---|
Тема | Re: chr(3) and 3::text |
Дата | |
Msg-id | CAKFQuwat0PxGdS5gjCYB7AmZrCXZQnBv5Wjw6WqhOEh_GuYyYw@mail.gmail.com обсуждение исходный текст |
Ответ на | chr(3) and 3::text (gmail Vladimir Koković <vladimir.kokovic@gmail.com>) |
Список | pgsql-novice |
On Sat, Mar 28, 2020 at 6:21 AM gmail Vladimir Koković <vladimir.kokovic@gmail.com> wrote:
Hi,
Why is chr(3) is different than 3::text ?
First place to start given two things you may or may not know what they are is the index in the documentation:
From there:
Definiton of chr()
Meaning of "::"
Knowing that your data is likely in UTF but that for lower numbers code points (below 256) it doesn't actually matter as it is standard ASCII assumes some level of knowledge too.
Examples:
replace(Filler,chr(3),'') WORKS
replace(Filler3::text,'') WRONG
You seem to know that "Fillter" is text so neither of these seems particularly useful. If you want to replace the string '3' in Filler with the empty string just write: replace(filler, '3', ''').
David J.
В списке pgsql-novice по дате отправления: