Skip site navigation (1) Skip section navigation (2)

Re: How to load a dump file into a DB

From: Arvind Sharma <arvind321(at)yahoo(dot)com>
To: David Vargas <davidvargasmoya(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: How to load a dump file into a DB
Date: 2010-07-29 05:45:11
Message-ID: 668090.57612.qm@web110115.mail.gq1.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
Have you tried:

$ psql -Unewdb -f db.sql    (it would prompt you for the password for the newdb 
user)

Arvind





________________________________
From: David Vargas <davidvargasmoya(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Sent: Wed, July 28, 2010 5:40:54 PM
Subject: [NOVICE] How to load a dump file into a DB

Hi,

I need to load a pgdump.sql file into a new Postgres db, but I'm totally not 
being able to do it. I am no programmer, I have installed the latest Postgres 
version for Windows, run the server, open psql. According to the pg_dump 
documentation, I should just run the command "$ psql -d newdb -f db.sql" into 
psql, but when I do it, nothing seems to be happening, I just get a new 
"postgres=#" line right away. I did change the db and file names to my names.

Can anybody give me any hint on how this should be done?? I've been searching 
all around without success. Is pg_dump already installed with the main 
installation? I even searched for a different way to convert this file into a PG 
database, but could not find a tool to specifically do that.

Thanks a lot, any help will be greatly appreciated!

Best regards,
David V.



      

In response to

pgsql-novice by date

Next:From: JORGE MALDONADODate: 2010-07-29 16:53:35
Subject: ASSIGNING TABLE PRIVILEGES
Previous:From: Tom LaneDate: 2010-07-29 03:31:50
Subject: Re: How to load a dump file into a DB

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group