pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Susanne Holzgraefe <miracee@web.de>
To: pgsql-bugs@lists.postgresql.org
Subject: replace() using NULL
Date: Wed, 13 Apr 2022 10:38:28 +0200
Message-ID: <29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de> (raw)

Hello,

tested by using postgresql 13.5:

SELECT REPLACE('xyz‘, ’y’, ’a’); => xaz => expected
SELECT REPLACE('xyz', 'a‘, 'b‘); => xyz => expected

SELECT REPLACE('xyz‘, 'a‘, NULL); => NULL

Also tested by using MariaDB. Same behavior like in PG.
Tested with Oracle, result is ‚xyz‘.

That is what I would expect because xyz includes no a.

I neither can find any documentation about this nor a bug report.

Regards,

miracee (Susanne)

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (3+ messages)  latest in thread

Message-ID: <29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de>
Permalink:  ../29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de/
Also on:    postgresql.org/message-id/29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de

 · 

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 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-bugs@postgresql.org
  Cc: miracee@web.de
  Subject: Re: replace() using NULL
  In-Reply-To: <29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de>
  References: <29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de>

* 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