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 ? - Mailing list pgsql-general

From Peter J. Holzer
Subject 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 ?
Date
Msg-id 20201030181305.GC20042@hjp.at
Whole thread Raw
In response to 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>)
List 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!"

Attachment

pgsql-general by date:

Previous
From: David Gauthier
Date:
Subject: 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 ?
Next
From: Tom Lane
Date:
Subject: 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 ?