replace() using NULL - Mailing list pgsql-bugs

From Susanne Holzgraefe
Subject replace() using NULL
Date
Msg-id 29A17362-1756-422E-9BD3-2CBE9F8C990F@web.de
Whole thread Raw
Responses Re: replace() using NULL  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-bugs
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)

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17462: Invalid memory access in heapam_tuple_lock
Next
From: Julien Rouhaud
Date:
Subject: Re: replace() using NULL