Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9BNK-00061u-5u for pgsql-php@postgresql.org; Wed, 05 Sep 2012 08:54:18 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9BNH-00044G-Vb for pgsql-php@postgresql.org; Wed, 05 Sep 2012 08:54:17 +0000 Received: from [46.18.9.33] (helo=[127.0.0.1]) by meldrar.postgresql.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1T9BNE-0003W4-RW; Wed, 05 Sep 2012 08:54:15 +0000 Message-ID: <5047132A.8040402@iol.ie> Date: Wed, 05 Sep 2012 09:54:02 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Archana K N CC: PostgreSQLPHP PostgreSQLPHP Subject: Re: References: In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 46.18.9.33 (deferred) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201209/3 X-Sequence-Number: 4275 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@iol.ie