Perl script to rename Postgres user in dump file
perl -pi -e "s/^\\connect olduser$/\\connect newuser/" filename
Thanks, Dave, Dossy, and Til.
To load in the database dump:
psql -f filename dbusername
Perl script to rename Postgres user in dump fileposted Dec 19, 2008, 3:56 PM by Jade Rubick