From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Archana K N <archanakknn(at)gmail(dot)com> |
Cc: | PostgreSQLPHP PostgreSQLPHP <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: |
Date: | 2012-09-05 08:54:02 |
Message-ID: | 5047132A.8040402@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
On 05/09/2012 08:18, Archana K N wrote:
> I used the "Export" option in the phpPgAdmin for exporting certain
> database and i got a zip file with .sql file inside it. I dont know
> how to import it back to postgres as i dont see any option for
> importing.
You have to use the unzipped SQL file as input to psql, thus:
psql -f my-file.sql my-database
This is assuming that the db server is running on localhost; if not, use
the -h option to specify the host.
> I am a bit confused with the psql command prompt.
The docs are the best place to start:
http://www.postgresql.org/docs/9.1/static/app-psql.html
HTH,
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie
From | Date | Subject | |
---|---|---|---|
Next Message | Archana K N | 2012-09-05 10:31:48 | Re: |
Previous Message | Archana K N | 2012-09-05 07:19:44 | Importing data in postgres from .sql file |