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

From Andre Lopes
Subject How to use pg_restore with *.sql file?
Date
Msg-id AANLkTinTS=733gz2Unr-NYyfQqEqdzESPO5xyVgMRf2W@mail.gmail.com
Whole thread Raw
Responses Re: How to use pg_restore with *.sql file?  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: How to use pg_restore with *.sql file?  (Dmitriy Igrishin <dmitigr@gmail.com>)
List pgsql-general
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?

I have tried:

[quote]
pg_restore -d databasename exportfilename.sql
[/quote]

But without success...

What is the best way to import the *.sql file to the database?


Best Regards,

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Index on points
Next
From: Scott Marlowe
Date:
Subject: Re: How to use pg_restore with *.sql file?