Re: How to use pg_restore with *.sql file? - Mailing list pgsql-general

From Andre Lopes
Subject Re: How to use pg_restore with *.sql file?
Date
Msg-id AANLkTi=9WwYLonrZTGaivwJV0AXMjcHD0v79goXdSDo0@mail.gmail.com
Whole thread Raw
In response to Re: How to use pg_restore with *.sql file?  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Thanks a lot! It works.


On Sat, Sep 25, 2010 at 1:23 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Sat, Sep 25, 2010 at 6:19 AM, Andre Lopes <lopes80andre@gmail.com> wrote:
> Hi,
>
> I have generate an *.sql file with the command:
>
> [quote]
> pg_dump -a --inserts databasename > exportfilename.sql
> [/quote]
>
> How can I use the pg_restore to import the data to the database?

Don't.

Just use psql with plain sql dumps:

psql databasename -f exportfilename.sql

pgsql-general by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: How to use pg_restore with *.sql file?
Next
From: Josh Kupershmidt
Date:
Subject: Re: Listen and do something daemon