(no subject)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Archana K N
Hi,

    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. I am a bit confused with the psql command prompt. Can anyone please help me to import the data back.
    

--
-------------------
regards
archana
--------------------
Reply | Threaded
Open this post in threaded view
|

Re:

Raymond O'Donnell
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
[hidden email]


--
Sent via pgsql-php mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
Reply | Threaded
Open this post in threaded view
|

Re:

Archana K N


Thanks

         It Worked!!!!!!!!!!!!!

 


--
-------------------
regards
archana
--------------------