BUG #4865: replace function returns null

From: "Jamolkhon Khakimov" <jkhakimov(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4865: replace function returns null
Date: 2009-06-19 12:40:11
Message-ID: 200906191240.n5JCeBKY065827@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4865
Logged by: Jamolkhon Khakimov
Email address: jkhakimov(at)gmail(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-06-19 13:47:01 Re: BUG #4862: different results in to_date() between 8.3.7 & 8.4.RC1
Previous Message pasman 2009-06-19 10:58:18 BUG #4864: rc1 not installs on Windows