From: Yasir Malik <ymalik@cs.stevens-tech.edu>
To: Kornelije <krabuzin@foi.hr>
Cc: pgsql-sql@postgresql.org
Subject: Re: Replace function ...
Date: Mon, 17 May 2004 15:34:42 -0400 (EDT)
Message-ID: <Pine.NEB.4.58.0405171532470.23482@pink-elephant.cs.stevens-tech.edu> (raw)
In-Reply-To: <009501c43c1f$63d39580$b103a8c0@krabuzin>
References: <009501c43c1f$63d39580$b103a8c0@krabuzin>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I need to write a function which has to replace a character with two or three other characters ....
>
You can use the replace function as specified below:
replace(string text, from text, to text) text
Replace all occurrences in @string of substring @from with substring @to.
replace( 'abcdefabcdef', 'cd', 'XX') ==> abXXefabXXef
Yasir
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iQEVAwUBQKkT1+J7vYSSIbWdAQL/5QgAmCdJrYh4YjJFWKeWNk+OEuhpvRNYbRlM
tH5dezmUrR4fkM4l2mfrmuIkTT+rqQNyRR3E5PhKyfkbnHdw7/WPalqGSbX1aIfP
YZI/RdxH/Aqy+hO+zcUQzSjpYSEyKrmTVGLmRf+tyYg0QdZdAQFd6O9aKWMeCo28
TFKRFAlg+glT/YiN1JiwzF/QygBNmo3g+JDWZ+U8Au+y0fHh/3KeoyLx9ipMSqs/
uBiy8eNjOdAF3ihoydDw2uBpzjwtGv9eeR0Myh8m4Zvx9K239NVSz4s9a+2R1Onf
Mr5PK7Te5TG8TLcjJyo35x8yC/57oufNvWoi+Q6Y7cmSxeiEcHzJiw==
=xChX
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ymalik@cs.stevens-tech.edu, krabuzin@foi.hr
Subject: Re: Replace function ...
In-Reply-To: <Pine.NEB.4.58.0405171532470.23482@pink-elephant.cs.stevens-tech.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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