From: | "Jie Liang" <jie(at)stbernard(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | <pgsql-admin(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | string function -- replace needs a clear doc |
Date: | 2003-08-11 22:51:01 |
Message-ID: | E7E213858379814A9AE48CA6754F5ECB36321B@mail01.stbernard.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin 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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-08-11 23:00:52 | Re: string function -- replace needs a clear doc |
Previous Message | Bruce Momjian | 2003-08-11 22:14:46 | Re: Backup routine |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-08-11 23:00:52 | Re: string function -- replace needs a clear doc |
Previous Message | krystoffff | 2003-08-11 22:19:08 | optimisation of a code |