Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?
Дата
Msg-id 20201030181305.GC20042@hjp.at
обсуждение исходный текст
Ответ на Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?  (David Gauthier <davegauthierpg@gmail.com>)
Список pgsql-general
On 2020-10-30 13:51:49 -0400, David Gauthier wrote:
> Next question, how does one actually replace the thing ?
> replace(thestring,0x2026,'...') 
> ... isn't going to fly. 
> Working with binary values in PG isn't at the top of my resume :-)

Either just type (or copy/paste) it:

    select replace('a … string …', '…', '...');

or use the chr() function:

    select replace('a … string …', chr(8230), '...');


I would prefer the former as it is easier to read (as long as the
characters are printable), but the latter may be easier to type.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: David Gauthier
Дата:
Сообщение: Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?