Search Postgresql Archives

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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux