Re: Restoring pg_dump Backup with psql Fails

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Phillip Smith <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Restoring pg_dump Backup with psql Fails
Date: 2007-12-29 04:54:10
Message-ID: 4775D2F2.4080502@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Phillip Smith wrote:
> Sorry Tom - I should know better :)
>
> I've attached the first 512 lines of the output from psql. The whole output
> is 3mb.
>

You have several problems in this dump. One it appears that some of the
releations already exist. Did you by chance accidently create stuff
within template1 at some point?

Secondly you need to look into iconv to fix your invalid UTF8 data.

Joshua D. Drake

> Cheers,
> ~p
>
>> -----Original Message-----
>> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>> Sent: Saturday, 29 December 2007 13:26
>> To: Phillip Smith
>> Cc: pgsql-admin(at)postgresql(dot)org
>> Subject: Re: [ADMIN] Restoring pg_dump Backup with psql Fails
>>
>> "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au> writes:
>>> But I get a whole bunch of errors, for example:
>>> <snip>
>>> ERROR: syntax error at or near "all"
>>> LINE 1: all orders over $400.00 - freight free Order 10 of any produ...
>>> ^
>> Please show us the *first* few errors, not some randomly chosen ones.
>> The above looks like a COPY has failed and psql has started thinking
>> that copy-data lines are commands, but how or why that happened is
>> not in evidence.
>>
>> regards, tom lane
>
>
> THINK BEFORE YOU PRINT - Save paper if you don't really need to print this
>
> *******************Confidentiality and Privilege Notice*******************
>
> The material contained in this message is privileged and confidential to
> the addressee. If you are not the addressee indicated in this message or
> responsible for delivery of the message to such person, you may not copy
> or deliver this message to anyone, and you should destroy it and kindly
> notify the sender by reply email.
>
> Information in this message that does not relate to the official business
> of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
> Weatherbeeta, its employees, contractors or associates shall not be liable
> for direct, indirect or consequential loss arising from transmission of this
> message or any attachments
> e-mail.
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-12-29 05:09:01 Re: Restoring pg_dump Backup with psql Fails
Previous Message Phillip Smith 2007-12-29 03:48:53 Re: Restoring pg_dump Backup with psql Fails