Re: psql and Emacs on Windows

From: Wenjian Yang <wenjiany(at)gmail(dot)com>
To: Bill Bartlett <bbartlett(at)softwareanalytics(dot)com>
Cc: jd(at)commandprompt(dot)com, Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: psql and Emacs on Windows
Date: 2009-08-08 18:34:36
Message-ID: bf9d6a9e0908081134g41b3b647l1b05be2e39615d8f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the replies.

I tried Cygwin and unfortunately failed to get it to work with the "native"
emacs binary for windows. I didn't spend too much time to try though, since
the version of postgresql with cygwin is still 8.2.*, and I'm not sure how
good the future support will be...

I did try another option, using both emacs and psql from Portable Ubuntu,
that works fine as expected. The version of psql is 8.3. Now, I need to see
how well it can connect to other databases from within Ubuntu, ;-) But the
worst case the user can use two emacs (from windows and from Ubuntu) if they
have to.

It would be nice to have native psql for Windows and native emacs for
Windows work out of box in the future though.

Thanks again.

Wenjian

On Fri, Aug 7, 2009 at 1:12 PM, Bill Bartlett <
bbartlett(at)softwareanalytics(dot)com> wrote:

> 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Michaels 2009-08-08 21:45:06 libpq
Previous Message Sualeh Fatehi 2009-08-08 14:37:12 Re: A compare and/or sync. database structure?