How to use pg_restore with *.sql file?

From: Andre Lopes <lopes80andre(at)gmail(dot)com>
To: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: How to use pg_restore with *.sql file?
Date: 2010-09-25 12:19:29
Message-ID: AANLkTinTS=733gz2Unr-NYyfQqEqdzESPO5xyVgMRf2W@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2010-09-25 12:23:00 Re: How to use pg_restore with *.sql file?
Previous Message Richard Huxton 2010-09-25 10:35:45 Re: Index on points