From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.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: Fri, 30 Oct 2020 19:13:05 +0100
Message-ID: <20201030181305.GC20042@hjp.at> (raw)
In-Reply-To: <CAMBRECBcEka59GMLAY6LmOuuEgYHNRyd2Pkr4gQwVA0Ww8-MAw@mail.gmail.com>
References: <CAMBRECDY5gHrdrr+xvG5aAdsi1LTH1RZCbj3fzEWmOEcTv8FSQ@mail.gmail.com>
<9a237283-d0d6-08ac-ae6b-f224c71c19ef@minerva.info>
<CAMBRECBcEka59GMLAY6LmOuuEgYHNRyd2Pkr4gQwVA0Ww8-MAw@mail.gmail.com>
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!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: hjp-pgsql@hjp.at
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 ?
In-Reply-To: <20201030181305.GC20042@hjp.at>
References: <CAMBRECDY5gHrdrr+xvG5aAdsi1LTH1RZCbj3fzEWmOEcTv8FSQ@mail.gmail.com> <9a237283-d0d6-08ac-ae6b-f224c71c19ef@minerva.info> <CAMBRECBcEka59GMLAY6LmOuuEgYHNRyd2Pkr4gQwVA0Ww8-MAw@mail.gmail.com> <20201030181305.GC20042@hjp.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox