Scripting postgres commands

From: "Ferry, Craig" <crferry(at)wescodist(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Scripting postgres commands
Date: 2007-12-19 15:43:21
Message-ID: 6B6D3063DF0A7A4DB8A989D40C61BEB33817FB@EMAIL02.wescodist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I can run the following command from a command prompt with no problem on my database.

/usr/bin/vacuumdb --verbose --analyze --all -U postgres

But if I try to execute it via a bash shell script, I receive the following error. The role does exist in the database.

does not existnot connect to database postgres: FATAL: role "postgres

I am new to postgresql so any help would be greatly appreciated.

Thanks

Craig

 
________________________________________
 
 Craig Ferry
 Sr. Database Administrator
 WESCO Distribution, Inc.
 Suite 700
 225 West Station Square Drive
 Pittsburgh, PA 15219
 P:412-454-2835
 F:412-222-7535
 crferry(at)wescodist(dot)com
________________________________________

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-12-19 17:04:10 Re: Scripting postgres commands
Previous Message Scott Marlowe 2007-12-19 15:33:06 Re: How to uses self query plan