pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Scripting postgres commands 2+ messages / 2 participants [nested] [flat]
* Scripting postgres commands @ 2007-12-19 15:43 Ferry, Craig <crferry@wescodist.com> 2007-12-19 17:04 ` Re: Scripting postgres commands Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Ferry, Craig @ 2007-12-19 15:43 UTC (permalink / raw) To: 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@wescodist.com ________________________________________ ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Scripting postgres commands 2007-12-19 15:43 Scripting postgres commands Ferry, Craig <crferry@wescodist.com> @ 2007-12-19 17:04 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2007-12-19 17:04 UTC (permalink / raw) To: Ferry, Craig <crferry@wescodist.com>; +Cc: pgsql-admin "Ferry, Craig" <crferry@wescodist.com> writes: > 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. Given the curious formatting of the complaint, it looks like what the database is actually seeing as the requested username is "postgres\r" (ie, there's a carriage return or perhaps a newline character tacked onto the name). Better check your quoting in the shell script. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-12-19 17:04 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-12-19 15:43 Scripting postgres commands Ferry, Craig <crferry@wescodist.com> 2007-12-19 17:04 ` Tom Lane <tgl@sss.pgh.pa.us>
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