dbTalk Databases Forums  

Re: [BUGS] Replace function BUG

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Replace function BUG in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] Replace function BUG - 07-16-2004 , 03:27 PM







On Tue, 13 Jul 2004, Nicolas Bottarini wrote:

Quote:
In postgreSQL 7.3.2 when I execute the following query

select replace('test %400% result', 'result', 'ok');

it returns "test % ok"
I think this was fixed in the 7.4 branch.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Replace function BUG - 07-16-2004 , 11:35 PM






Stephan Szabo <sszabo (AT) megazone (DOT) bigpanda.com> writes:
Quote:
On Tue, 13 Jul 2004, Nicolas Bottarini wrote:
In postgreSQL 7.3.2 when I execute the following query

select replace('test %400% result', 'result', 'ok');

it returns "test % ok"

I think this was fixed in the 7.4 branch.
It was fixed in 7.3 branch as well:

2003-04-23 14:19 tgl

* src/backend/utils/adt/varlena.c (REL7_3_STABLE): Fix misbehavior
of replace() on strings containing '%'. Will patch separately but
equivalently in HEAD.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #3  
Old   
Theodore Petrosky
 
Posts: n/a

Default Re: [BUGS] Replace function BUG - 07-17-2004 , 10:52 AM




7.4.2 gives it like this:

testbed=# select replace('test %%400%% result',
'result', 'ok');
replace
-----------------
test %%400%% ok
(1 row)

testbed =# select replace('test %400% result',
'result', 'ok');
replace
---------------
test %400% ok
(1 row)

Ted



-- Nicolas Bottarini <nicolas (AT) avatarla (DOT) com> wrote:
Quote:
In postgreSQL 7.3.2 when I execute the following
query

select replace('test %400% result', 'result', 'ok');



it returns "test % ok"



And If I Execute:

select replace('test %%400%% result', 'result',
'ok');

it returns the correct result: "test %400% ok"



If this is a known BUG please tell me because I need
to fix this.



Thanks



Nicolas Bottarini






__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/...otelifeengine/


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.