pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Raymond O'Donnell <rod@iol.ie>
To: Michael Paquier <michael.paquier@gmail.com>
To: Gaurav Jindal <gaurjin@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-general@postgresql.org>
Subject: Re: import .sql file into PostgreSQL database
Date: Tue, 08 Apr 2014 12:32:00 +0100
Message-ID: <5343DE30.7060306@iol.ie> (raw)
In-Reply-To: <CAB7nPqRvp8_3thSDHmzwqoHJzEQLZd=TsYbRjcHup_p4PGn4cg@mail.gmail.com>
References: <CAFWM-9uhr3dw2LNawO2gFDCVNpEivQwhv1k9+FzBELPzdW5QrQ@mail.gmail.com>
	<CAB7nPqRvp8_3thSDHmzwqoHJzEQLZd=TsYbRjcHup_p4PGn4cg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 08/04/2014 04:47, Michael Paquier wrote:
> On Tue, Apr 8, 2014 at 12:33 PM, Gaurav Jindal <gaurjin@gmail.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.

Where is the "Permission denied" coming from? - the OS, or Postgres?

Check, in addition to the above, that the Postgres user you're using for
the connection has the requisite INSERT, SELECT (etc) permissions on the
database objects.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (7+ messages)  latest in thread

Message-ID: <5343DE30.7060306@iol.ie>
Permalink:  ../5343DE30.7060306@iol.ie/
Also on:    postgresql.org/message-id/5343DE30.7060306@iol.ie

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rod@iol.ie, michael.paquier@gmail.com, gaurjin@gmail.com
  Subject: Re: import .sql file into PostgreSQL database
  In-Reply-To: <5343DE30.7060306@iol.ie>
  References: <CAFWM-9uhr3dw2LNawO2gFDCVNpEivQwhv1k9+FzBELPzdW5QrQ@mail.gmail.com> <CAB7nPqRvp8_3thSDHmzwqoHJzEQLZd=TsYbRjcHup_p4PGn4cg@mail.gmail.com> <5343DE30.7060306@iol.ie>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox