On Wed, Aug 27, 2008 at 10:53 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote: > > No, you were right the first time: just feed the dump script to psql. > Ok. Tried that. Because there's no database, I have to execute the psql command as "postgres" otherwise it doesn't work. So here's my command: $ psql -d postgres -U postgres -h localhost < mydb.sql This seems to be it. This is what I should be executing, except that it spews out many errors, like: ERROR: invalid byte sequence for encoding "UTF8": 0x80 This prevents my main table from being copied - Why can't the dump and the restore just copy the file as-is, including the encoding and such? What am I not doing right? Thanks