| From: | "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Dumping/Restoring with constraints? |
| Date: | 2008-08-27 15:20:55 |
| Message-ID: | e373d31e0808270820ia11a515se1110775ab29e998@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-general |
On Wed, Aug 27, 2008 at 10:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Sullivan | 2008-08-27 15:32:38 | Re: Dumping/Restoring with constraints? |
| Previous Message | Tom Lane | 2008-08-27 14:53:22 | Re: Dumping/Restoring with constraints? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Sullivan | 2008-08-27 15:32:38 | Re: Dumping/Restoring with constraints? |
| Previous Message | Ivan Sergio Borgonovo | 2008-08-27 15:14:46 | Re: loop vs. aggregate was: update and group by/aggregate |