Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"

From: "Hager, Paul CIV NAVSEA Crane, NAVSEA" <paul(dot)hager(at)navy(dot)mil>
To: "Dave Page" <dpage(at)pgadmin(dot)org>
Cc: "pgAdmin Support" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"
Date: 2013-09-10 19:28:16
Message-ID: 80BEA9C0F981324E996C49694D18E3500CFE739D@naeacranez03v.nadsusea.nads.navy.mil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

OK, I tried again. Did:
"c:\program files\postgresql\9.1\bin\psql" -h localhost -U postgres development-pgs < dsYYYYMMDD

That actually worked - thanks. However, it produced a large number of errors - things like "relation X already exists". Also, no DB file called "development-pgs" was created, which I expected.

I decided to go back to the original recipe and logged in to pgAdmin. Got a huge number of errors. Decided to edit files as in original recipe. This time just edited out the "\connect" and the "GRANT INSERT" commands in the schema file. I actually think that was intended in the recipe though it was by no means clear. Opened file in pgAdmin. Then I executed as script. Lots of errors this time. Here's a representative one:
[WARNING] CREATE TABLE "whatever" (
"whatever1" integer
"whatever2" character varying(50) NOT NULL
)
[ERROR] relation "whatever" already exists
There are also manifold duplicate key errors.

Now it may be that something has been loaded from a previous effort. I went on ahead and loaded the large data file. Vast numbers of errors including duplicate keys.

I made an attempt to look at the database. There seemed to be some tables but there were no connections. Given all the errors I don't trust any of this. I'm thinking I might blow everything away, recreate the database, and try again.

That brings up a second problem. Where is this database located? Assuming I have created something how do I save it. The last time I did a "save" operation, it just saved a schema file.

I need to have a discrete database somewhere outside of pgAdmin. I assume this is a trivial matter but I couldn't find how to do it. My attempts to invoke help tried to active IE. I'm on a Secret machine and there is no internet connection so that just generated an error.

Regards,

Paul Hager

Computer Scientist
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
Code WXMP, Bldg 3330W
300 Highway 361
Crane, IN 47522-5001
Ph: 812-854-1985
DSN: 482-1985
Fax: 812-854-1109
Email: paul(dot)hager(at)navy(dot)mil
SIPR: paul(dot)hager(at)navy(dot)smil(dot)mil
http://www.navsea.navy.mil/nswc/crane/Lists/customerfeedback/NewForm.aspx

-----Original Message-----
From: Dave Page [mailto:dpage(at)pgadmin(dot)org]
Sent: Tuesday, September 10, 2013 3:49 AM
To: Hager, Paul CIV NAVSEA Crane, NAVSEA
Cc: pgAdmin Support
Subject: Re: [pgadmin-support] Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1"

On Mon, Sep 9, 2013 at 6:16 PM, Hager, Paul CIV NAVSEA Crane, NAVSEA <paul(dot)hager(at)navy(dot)mil> wrote:
> I was only able to get to this today.
>
> I created the two files - schema and data per your suggestion below. Ended up with a relatively small schema file and a large data file, which is what I expected. They are located c:documents and settings\phager\my documents or something similar.
>
> Then I hit a snag. I assume on Windows XP I'm supposed to go to the command line. "psql" is not recognized. I went to c:\program files\9.1\bin\ and found psql.exe. I set my directory in "My Documents" and then did the following:
>
> "c:\program files\9.1\bin\psql" -h localhost development-pgs <
> dsYYYYMMDD
>
> That generated the following error: FATAL: role "phager" does not
> exist
>
> I haven't a clue what the problem is. What's a "role" and why is it treating part of the pathname as a "role"?

A role is both a user account and a user group in the database server.
It'll be defaulting to your operating system username. Try using:

"c:\program files\9.1\bin\psql" -h localhost -U postgres development-pgs < dsYYYYMMDD

To tell it to use the postgres role (the default superuser). If that's not the correct role, then you'll have to find out what is from your end as that's specific to your installation and the way it's been setup.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Belbin, Peter 2013-09-10 20:20:48 Re: RE: [pgadmin-support] will 1.18.0 be available for download from the www.pgadmin.org site?
Previous Message Dan Halbert 2013-09-10 19:07:50 RE: [pgadmin-support] will 1.18.0 be available for download from the www.pgadmin.org site?