Re: import .sql file into PostgreSQL database

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Gaurav Jindal <gaurjin(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: import .sql file into PostgreSQL database
Date: 2014-04-08 03:47:14
Message-ID: CAB7nPqRvp8_3thSDHmzwqoHJzEQLZd=TsYbRjcHup_p4PGn4cg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 8, 2014 at 12:33 PM, Gaurav Jindal <gaurjin(at)gmail(dot)com> wrote:
> How to import the .sql file using PSQL or PgAdmin? Can anyone guide me with
> details and step by step instructions.
>
> I tried \i filename.sql command but permission denied. I don't know how to
> make it work. Can anyone helps me out. Thanks!
As you mentionned "¥i $FILE" (as is psql -f $FILE) is just fine, as
you are getting a permission error just be sure that the user that is
using the client application has a read access to the sql file you are
trying to use.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-04-08 03:53:12 Re: Server Timezone
Previous Message Robert DiFalco 2014-04-08 03:46:36 Server Timezone