pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedimport .sql file into PostgreSQL database
7+ messages / 5 participants
[nested] [flat]
* import .sql file into PostgreSQL database
@ 2014-04-08 03:33 Gaurav Jindal <gaurjin@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Gaurav Jindal @ 2014-04-08 03:33 UTC (permalink / raw)
To: pgsql-general
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!
Gaurav
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: import .sql file into PostgreSQL database
@ 2014-04-08 03:47 Michael Paquier <michael.paquier@gmail.com>
parent: Gaurav Jindal <gaurjin@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Paquier @ 2014-04-08 03:47 UTC (permalink / raw)
To: Gaurav Jindal <gaurjin@gmail.com>; +Cc: pgsql-general
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.
--
Michael
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: import .sql file into PostgreSQL database
@ 2014-04-08 11:32 Raymond O'Donnell <rod@iol.ie>
parent: Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Raymond O'Donnell @ 2014-04-08 11:32 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; Gaurav Jindal <gaurjin@gmail.com>; +Cc: pgsql-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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: import .sql file into PostgreSQL database
@ 2014-04-09 16:02 Raymond O'Donnell <rod@iol.ie>
parent: Raymond O'Donnell <rod@iol.ie>
0 siblings, 1 reply; 7+ messages in thread
From: Raymond O'Donnell @ 2014-04-09 16:02 UTC (permalink / raw)
To: Gaurav Jindal <gaurjin@gmail.com>; +Cc: Michael Paquier <michael.paquier@gmail.com>; pgsql-general
On 09/04/2014 03:42, Gaurav Jindal wrote:
> Inline image 1
>
>
> On Tue, Apr 8, 2014 at 5:21 PM, <gaurjin@gmail.com
> <mailto:gaurjin@gmail.com>> wrote:
>
> > - Your OS
> Windows 7
> > - What version of PostgreSQL you have
> 9.3.4
> > - What is in the SQL file you're trying to execute.
> Tables and their description
> > - The EXACT error message that you're getting.
> Permission denied when I run
> \i dump.sql in psql
Please keep your replies on-list.
I think that message is coming from the OS; messages from Postgres are
usual more specific, for example, "Permission denied for relation....".
It looks as if you haven't the OS permissions to read the SQL file.
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: import .sql file into PostgreSQL database
@ 2014-04-09 23:32 Michael Paquier <michael.paquier@gmail.com>
parent: Raymond O'Donnell <rod@iol.ie>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Paquier @ 2014-04-09 23:32 UTC (permalink / raw)
To: rod@iol.ie; +Cc: Gaurav Jindal <gaurjin@gmail.com>; pgsql-general
On Thu, Apr 10, 2014 at 1:02 AM, Raymond O'Donnell <rod@iol.ie> wrote:
> I think that message is coming from the OS; messages from Postgres are
> usual more specific, for example, "Permission denied for relation....".
>
> It looks as if you haven't the OS permissions to read the SQL file.
On Windows, you need either to play with icacls to set some read
permissions or you can change it directly using the properties menu
findable by right-clicking on the culprit file.
--
Michael
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] import .sql file into PostgreSQL database
@ 2020-05-08 03:46 Gaurav <gaurjin@gmail.com>
parent: Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Gaurav @ 2020-05-08 03:46 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: rod@iol.ie; pgsql-general
Just going thru old emails and came across this one. Thought to text you.
How have you been? What are you up to? How can I rejoin this group?
Gaurav
On Wed, Apr 9, 2014 at 7:32 PM Michael Paquier <michael.paquier@gmail.com>
wrote:
> On Thu, Apr 10, 2014 at 1:02 AM, Raymond O'Donnell <rod@iol.ie> wrote:
> > I think that message is coming from the OS; messages from Postgres are
> > usual more specific, for example, "Permission denied for relation....".
> >
> > It looks as if you haven't the OS permissions to read the SQL file.
> On Windows, you need either to play with icacls to set some read
> permissions or you can change it directly using the properties menu
> findable by right-clicking on the culprit file.
> --
> Michael
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] import .sql file into PostgreSQL database
@ 2020-05-09 07:32 Michael Paquier <michael@paquier.xyz>
parent: Gaurav <gaurjin@gmail.com>
0 siblings, 0 replies; 7+ messages in thread
From: Michael Paquier @ 2020-05-09 07:32 UTC (permalink / raw)
To: Gaurav <gaurjin@gmail.com>; +Cc: Michael Paquier <michael.paquier@gmail.com>; rod@iol.ie; pgsql-general
On Thu, May 07, 2020 at 11:46:02PM -0400, Gaurav wrote:
> Just going thru old emails and came across this one. Thought to text you.
> How have you been? What are you up to? How can I rejoin this group?
Fine thanks. In order to subscribe to one or more mailing lists,
please feel free to look here:
https://lists.postgresql.org/
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-05-09 07:32 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-08 03:33 import .sql file into PostgreSQL database Gaurav Jindal <gaurjin@gmail.com>
2014-04-08 03:47 ` Michael Paquier <michael.paquier@gmail.com>
2014-04-08 11:32 ` Raymond O'Donnell <rod@iol.ie>
2014-04-09 16:02 ` Raymond O'Donnell <rod@iol.ie>
2014-04-09 23:32 ` Michael Paquier <michael.paquier@gmail.com>
2020-05-08 03:46 ` Gaurav <gaurjin@gmail.com>
2020-05-09 07:32 ` Michael Paquier <michael@paquier.xyz>
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