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

Re: BUG #3059: psql to 'postgres' shortcut

From: Phil Frost <phil(at)macprofessionals(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>,Raymond Naseef <raymondnaseef(at)yahoo(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3059: psql to 'postgres' shortcut
Date: 2007-02-27 14:06:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Hrm...I haven't used windows for a while now, but isn't there an  
option on all shortcuts to command-line programs to make the shell  
pause on exit? It is something like, right click on shortcut, select  
'properties', uncheck 'close shell on exit'. It would seem this would  
solve the problem of not being able to see errors, while also not  
adding a pause for programs which execute psql.bat directly.

On Feb 27, 2007, at 8:28 AM, Magnus Hagander wrote:

> On Mon, Feb 26, 2007 at 09:46:24AM -0500, Bruce Momjian wrote:
>> Raymond Naseef wrote:
>>> The following bug has been logged online:
>>> Bug reference:      3059
>>> Logged by:          Raymond Naseef
>>> Email address:      raymondnaseef(at)yahoo(dot)com
>>> PostgreSQL version: 8.2
>>> Operating system:   Windows XP
>>> Description:        psql to 'postgres' shortcut
>>> Details:
>>> The shortcut to run psql.exe added to the menus is a great think  
>>> to do, but
>>> when the program stops the window closes with no pause or time  
>>> delay.
>>> This is a serious issue if the login fails.  Sometimes I forget  
>>> to start the
>>> server, but I do not know that because I cannot read text in  
>>> ~0.02 seconds.
>>> BTW, I bet some of your other .bat files have the same issue.
>>> Please run it by doing 1 or other:
>>> 1. Putting a "pause" at the end of the batch file.
>>> 2. cmd.exe /K "<command line>"
>>>     (just note the "" for default user name will make this fail.   
>>> Sorry I do
>>> not know how to fix that unless username has no bad-for-cmd  
>>> characters in
>>> it, then quotes are not needed)
>> These solutions are going to make psql very annoying when it does  
>> work
>> properly.
> Indeed. But it *is* also a problem the way it is now (I've noticed
> myself a couple of times, but never had the time to fix it)
> Perhaps a reasonable thing to do would be to have the shortcut  
> point to
> a .BAT file that does a "pause" only if psql exits with a non-zero
> exitcode.
> Is this reasonable? Will psql always exit with non-zero when something
> like this happen and also importantly, willi t always exit with a zero
> exitcode if there is no problem?

In response to


pgsql-bugs by date

Next:From: Magnus HaganderDate: 2007-02-27 14:23:57
Subject: Re: BUG #3059: psql to 'postgres' shortcut
Previous:From: Magnus HaganderDate: 2007-02-27 13:40:11
Subject: Re: Spelling error in 8.1.6-1 Windows Error Dialog typo

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