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 ?

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
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: 2020-10-30 18:13:05
Message-ID: 20201030181305.GC20042@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-10-30 18:14:52 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 ?
Previous Message David Gauthier 2020-10-30 17:51:49 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 ?