Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1" - Mailing list pgadmin-support
From | Hager, Paul CIV NAVSEA Crane, NAVSEA |
---|---|
Subject | Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1" |
Date | |
Msg-id | 80BEA9C0F981324E996C49694D18E3500CFE739D@naeacranez03v.nadsusea.nads.navy.mil Whole thread Raw |
In response to | Re: Second message: "Problem generating database using pgAdmin III - PostgreSQL version is 9.1" (Dave Page <dpage@pgadmin.org>) |
Responses |
Re: Second message: "Problem generating database
using pgAdmin III - PostgreSQL version is 9.1"
|
List | 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 filesas 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 Iexecuted 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. Vastnumbers 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 theerrors 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. Thelast 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 howto do it. My attempts to invoke help tried to active IE. I'm on a Secret machine and there is no internet connectionso 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.hager@navy.mil SIPR: paul.hager@navy.smil.mil http://www.navsea.navy.mil/nswc/crane/Lists/customerfeedback/NewForm.aspx -----Original Message----- From: Dave Page [mailto:dpage@pgadmin.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.hager@navy.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 anda large data file, which is what I expected. They are located c:documents and settings\phager\my documents or somethingsimilar. > > 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 toc:\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 outwhat 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
pgadmin-support by date: