"Jamolkhon Khakimov" <jkhaki...@gmail.com> writes:
> replace( 'abcdefabcdef', 'XX', null)
> // returns null, while it should return 'abcdefabcdef'

No, it should return null.  Like most Postgres functions, replace is
strict, meaning it returns null if any input is null.  This is sensible
in the abstract because an unknown input means the result is unknown
too.  I suppose your argument is that the result here could be
determined without knowing what the third argument value is, but the
mechanism doesn't attempt to make such a fine distinction.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to