On Friday, August 07, 2009 12:44 PM, Joshua D. Drake wrote: > On Fri, 2009-08-07 at 17:36 +0100, Sam Mason wrote: > > On Fri, Aug 07, 2009 at 11:11:10AM -0500, Wenjian Yang wrote: > > > We currently installed emacs 23.1 and PostgreSQL 8.4.0 for Windows on a > > > windows desktop. When issue "sql-postgres" in emacs, after providing > > > User/Password/Database/Server, nothing happens. There is no prompt from > > > emacs. Checking the server log, it doesn't seem to have received any > > > connection request. > > > > The current setup on my windows box uses the psql that comes with > > cygwin. Unfortunately I don't use it enough to remember the details of > > how or why I settled on this setup. > > readline? >
Yes, the problem is readline. When running the "native" psql.exe from inside any sort of a "shell" program on Windows (such as from inside emacs, rxvt, remote SSH command line, etc.), psql thinks it is running in batch mode so you see no prompts. It is indeed running, but you'll see no interactive information. >From my 8/4/2007 response to a similar posting: (start) We use the Cygwin version of the psql.exe program under Windows instead of the native psql.exe program, even though the rest of the PostgreSQL installation uses the standard native Windows versions of all the other PostgreSQL components (database, tools, etc.). (So before I get flamed, I want to clarify that the ONLY component of PostgreSQL that we use from Cygwin is psql.exe, and it's run from an alternate directory.) The main advantage that we get by using the Cygwin version of psql is that is runs in "interactive" mode regardless of how it is run, whereas the native psql program runs in non-interactive mode (showing almost no output, no prompts, no readline support, etc.) when run from most "shell" programs. We frequently run psql via a remote SSH connection or from the RXVT terminal program or from inside Emacs, and in all of these cases the native psql program runs in non-interactive mode whereas the Cygwin version of psql is fully-functional." (end) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general