pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedstring function -- replace needs a clear doc
3+ messages / 3 participants
[nested] [flat]
* string function -- replace needs a clear doc
@ 2003-08-11 22:51 Jie Liang <jie@stbernard.com>
0 siblings, 2 replies; 3+ messages in thread
From: Jie Liang @ 2003-08-11 22:51 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-admin@postgresql.org; pgsql-sql
urldb=# select replace('whateveritis','a','A');
replace
--------------
whAteveritis
(1 row)
urldb=# select replace('whateveritis','e','E');
replace
--------------
whatEvEritis
(1 row)
urldb=# select replace('whatever%20itis','e','E');
replace
---------------------------------
whatEvEr 1tis
(1 row)
urldb=# select replace('whatever%%20itis','e','E');
replace
-----------------
whatEvEr%20itis
(1 row)
urldb=# select replace('whatever%%20sitis','e','E');
replace
------------------
whatEvEr%20sitis
(1 row)
urldb=# select replace('whatever%20sitis','e','E');
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#
> psql urldb
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
urldb=# select replace('whatever%20sitis','si','SI');
replace
---------------
whateverSItis
(1 row)
1. No doc said % should escape by %%, and
select replace('whatever%20sites','%20','%%20') won't work also.
2. v7.3.2 haven't resolved this problem yet, I am not sure the later version.
Jie Liang
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: string function -- replace needs a clear doc
@ 2003-08-11 23:00 Stephan Szabo <sszabo@megazone.bigpanda.com>
parent: Jie Liang <jie@stbernard.com>
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Szabo @ 2003-08-11 23:00 UTC (permalink / raw)
To: Jie Liang <jie@stbernard.com>; +Cc: pgsql-admin@postgresql.org; pgsql-sql
On Mon, 11 Aug 2003, Jie Liang wrote:
> 1. No doc said % should escape by %%, and
> select replace('whatever%20sites','%20','%%20') won't work also.
> 2. v7.3.2 haven't resolved this problem yet, I am not sure the later version.
I seem to get the expected results on my 7.3.4 system.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: string function -- replace needs a clear doc
@ 2003-08-11 23:12 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jie Liang <jie@stbernard.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2003-08-11 23:12 UTC (permalink / raw)
To: Jie Liang <jie@stbernard.com>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; pgsql-admin@postgresql.org; pgsql-sql
"Jie Liang" <jie@stbernard.com> writes:
> 1. No doc said % should escape by %%, and
> select replace('whatever%20sites','%20','%%20') won't work also.
> 2. v7.3.2 haven't resolved this problem yet, I am not sure the later version.
In 7.3.3 release notes:
* Fix misbehavior of replace() on strings containing '%'
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-08-11 23:12 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 22:51 string function -- replace needs a clear doc Jie Liang <jie@stbernard.com>
2003-08-11 23:00 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2003-08-11 23:12 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox