Informix to Postgres Script

>>Script Language and Platform: Bash – Sed
This well-tested bash script is used to transfer data from
Informix to PostgreSQL. Copy and paste the script into an file and make it executable. (Only works in UNIX).

Author: Vasilis Ventirozos

sqlparser File Table
Script Code: #!/bin/bash
if test $# -ne 2
then echo “usage: sqlparser <File> <Table>”
echo “COPY “$2″ FROM stdin;” >$
cat $1|sed ”s/|$//” | sed ”s/,/./g”
|sed -e ”s/|/ /g” >>$
echo “.” >>$
echo “”
echo “Transform Complete to upload run cat $ |psql <SERVER>”
echo “”

We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…

Disclaimer Continued

Back to Database Journal Home

Latest Articles