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)