The following bug has been logged online:

Bug reference:      4865
Logged by:          Jamolkhon Khakimov
Email address:      jkhaki...@gmail.com
PostgreSQL version: 8.2.7
Operating system:   Linux
Description:        replace function returns null
Details: 

I dont know if it's a bug or not. It just seems illogical to me.

replace( 'abcdefabcdef', 'cd', 'XX')
// returns 'abXXefabXXef', ok

replace( 'abcdefabcdef', 'XX', 'YY')
// returns 'abcdefabcdef', ok

replace( 'abcdefabcdef', 'XX', null)
// returns null, while it should return 'abcdefabcdef'

Sorry if that's not a bug. Could find anything related to this in the
documentation.

-- 
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