public inbox for [email protected]  
help / color / mirror / Atom feed
From: gmail Vladimir Koković <[email protected]>
To: David G. Johnston <[email protected]>
Cc: pgsql-novice <[email protected]>
Cc: Ken Benson <[email protected]>
Subject: Re: chr(3) and 3::text
Date: Sat, 28 Mar 2020 16:09:47 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwaMQCb4QNA1+q8-3ZBgTMdoWFnvvSfUP4z6L5E7uCQOQw@mail.gmail.com>
References: <[email protected]>
	<CAKFQuwaMQCb4QNA1+q8-3ZBgTMdoWFnvvSfUP4z6L5E7uCQOQw@mail.gmail.com>

David,

Sorry for copy/paste error:replace(Filler,3::text,'') WRONG !

Character 0x03 is valid in ASCII and UTF-8 character sets.

Main question is, why is 3::text == '3' ?

On 28.3.20. 16:04, David G. Johnston wrote:
> On Sat, Mar 28, 2020 at 6:21 AM gmail Vladimir Koković 
> <[email protected] <mailto:[email protected]>> wrote:
>
>
>     replace(Filler,chr(3),'') WORKS
>
>     replace(Filler3::text,'') WRONG
>
> "Wrong" is not a helpful term unless you describe what you are 
> expecting and how the result you got is different.  In particular just 
> reading what you've typed the "wrong" one fails because you forgot the 
> comma between "Fillter" and "3::text".  But I suspect you had a 
> different unsaid expectation here.
>
> In the future you should consider writing self-contained expressions, 
> ideally ones that don't use physical tables if the problem permits.
>
> David J.
>


view thread (12+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: chr(3) and 3::text
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox