Search Postgresql Archives

Re: Problem with replace function in postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

please, can you send a source code of your function?

Regards

Pavel Stehule

2010/11/23 akp geek <akpgeek@xxxxxxxxx>:
> Dear all -
> ÂÂ Â Â Â Â Â Â ÂI am having trouble with replace function inside a function.
> ÂIf I do the same replace function outside it works fine, Following example
> clearly explains my problem. Can you please help?
>
> create table str_table
> ( mystr varchar(1000));
> insert into str_table values ( 'This road is INDEFLY CLSD');
> insert into str_table values('That is INDEFLY open');
> insert into str_table values('That is a CLSD road');
>
> select * from str_table;
> create table lookup
> ( code varchar(100),
> ÂÂcodeword varchar(100));
>
> insert into lookup values( Â'INDEFLY','indefinitely');
> insert into lookup values( Â'CLSD','closed');
> select 'This road is INDEFLY CLSD', test_repl('This road is INDEFLY CLSD
> INDEFLY') replaced_str
> from str_table;
> RESULT SET " ÂThis road is INDEFLY CLSD;This road is indefinitely closed
> INDEFLY Â"
> Regards

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux