When I try to run an inferior psql
process in emacs on windows, I seem to be getting no response. This seems to be a known problem the solution of which is to install the cygwin version of psql
. Unfortunately, the cygwin psql
appears to do absolutely nothing, even psql -V
does nothing. Does anyone have a solution to either of these problems or an easy way of sending queries from emacs to postgresql.
views:
75answers:
2This is probably not going to be a good answer, but I am not currently on a Windows machine with Emacs or PostGres, so I can't work out a better solution for you.
That said, are you able to run psql in a command shell? If so, perhaps you can try starting the shell (M-x shell
) or the Eshell (M-x eshell
) to start an inferior shell and running psql
from there.
I was originally going to suggest that you call M-x shell-command
(also M-!
) and then specify psql &
for your command. The &
lets Emacs know that you want to run the shell command asynchronously. However, this entry on the EmacsWiki indicates that it will not work on Windows. You might try it anyway and see what happens...
Ok, I finally figured out how to get the cygwin psql to run. It seems that the provided cygpq.dll was missing some entry point,
strace -o /dev/null psql --version
Responded with "The procedure entrypoint PQencryptPassword could not be located in the dynamic link library cygpq.dll."
I replaced the cygwin provided cygpq.dll with a locally compiled one and it appears that we are now cooking with gas. I need to learn more about cygwin dynamic linking. I thank all of you for your patient support.