Jade's weblog Archive

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

12:44 PM, 22 Jun 2004 by Jade Rubick Permalink | Comments (0)

XML