| From: | "Patrick Hatcher" <PHatcher(at)macys(dot)com> | 
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org | 
| Subject: | Cleaning text with function? | 
| Date: | 2002-09-25 15:29:04 | 
| Message-ID: | OF9B9951EC.1098D9A2-ON88256C3F.004FDAED-88256C3F.005508A4@fds.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-novice | 
Currently I have a perl script that I use to cleanse text fields in a file
for use in our mainframe.  I would like to do this as a function and bypass
using perl if possible.  Is this possible?  I do not have plperl installed
on the database due to server restrictions.
Example of current perl statement:
while (<>) { # Streams the corrected text back to the original file
        s/¨/ /g;    # Character replace
         s/ª/ /g;    # Character replace
        s/`/ /g;    # Character replace
         s/¡/ /g;    # Character replace
        s/Ë/A/g;    # Character replace
        s/Ò/ /g;    # Character replace
        s/Ó/ /g;    # Character replace
        s/æ/E/g;    # Character replace
        s/ê/I/g;    # Character replace
        s/ì/I/g;    # Character replace
        s/ï/O/g;    # Character replace
        print;          # this goes to the temp filehandle, ARGVOUT,
               # not STDOUT as usual, so don't mess with it !
}
TIA
Patrick Hatcher
Macys.Com
Legacy Integration Developer
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-09-25 15:29:51 | Re: install problem | 
| Previous Message | Phillip J. Allen | 2002-09-25 15:28:14 | Re: Question about cygwin/Postgre |