Re: How to import *.sql file to postgresql database

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Andre Lopes <lopes80andre(at)gmail(dot)com>
Cc: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to import *.sql file to postgresql database
Date: 2010-07-18 20:10:58
Message-ID: AANLkTimtfJVqyAyNVde4iIfDiU2Q2GnNlifqI0esD9Zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/7/18 Andre Lopes <lopes80andre(at)gmail(dot)com>

> Hi,
>
> I have a DUMP file with INSERT's commands. I need to import this data to
> postgresql database with the "psql" command.
>
> How can I do this task?
>
> Best Regards,
>

Hi,
you can do that for example using the following command:

psql <database> < file.sql

where <datatabase> is the name of the database you use.

regards
Szymon Guz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Osvaldo Kussama 2010-07-18 20:11:12 Re: How to import *.sql file to postgresql database
Previous Message Andre Lopes 2010-07-18 20:06:05 How to import *.sql file to postgresql database