Обсуждение: v8.2 ... command line interface on Windows
I am a PostgreSQL user, using the native windows version 8.2. I am new to PostgreSQL and am wondering if other users have suggestions regarding command line interfaces. I cannot for the life of me get readline to work on the Windows version. If you use IPython, for example, readline works fantastically with smart ctrl-P search of previous commands and tab completion. Does anyone know of a way either to get readline to work or another good command line interface? Thank you.
nac1967 wrote: > I am a PostgreSQL user, using the native windows version 8.2. I am new > to PostgreSQL and am wondering if other users have suggestions > regarding command line interfaces. I cannot for the life of me get > readline to work on the Windows version. If you use IPython, for > example, readline works fantastically with smart ctrl-P search of > previous commands and tab completion. Does anyone know of a way either > to get readline to work or another good command line interface? Readline only works with US keyboard layouts under native windows, that's why it's been turned off in the binary builds. You are left with the very limited commandline editing in the default windows command shell. If you are using only US keyboard layout, you can rebuild psql from source (using the MingW build system) with readline. You only need to rebuild psql - not libpq or the backend itself. //Magnus
On Aug 4, 3:08 pm, mag...@hagander.net (Magnus Hagander) wrote: > nac1967 wrote: > > I am a PostgreSQL user, using the native windows version 8.2. I am new > > to PostgreSQL and am wondering if other users have suggestions > > regarding command line interfaces. I cannot for the life of me get > > readline to work on the Windows version. If you use IPython, for > > example, readline works fantastically with smart ctrl-P search of > > previous commands and tab completion. Does anyone know of a way either > > to get readline to work or another good command line interface? > > Readline only works with US keyboard layouts under native windows, > that's why it's been turned off in the binary builds. You are left with > the very limited commandline editing in the default windows command shell. > > If you are using only US keyboard layout, you can rebuild psql from > source (using the MingW build system) with readline. You only need to > rebuild psql - not libpq or the backend itself. > > //Magnus > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq Thank you for your response. I will try and build it with the MingW system. Next question: is it worth it? I.e., is the tab completion and the command history via readline good?
On Aug 4, 3:08 pm, mag...@hagander.net (Magnus Hagander) wrote: > nac1967 wrote: > > I am a PostgreSQL user, using the native windows version 8.2. I am new > > to PostgreSQL and am wondering if other users have suggestions > > regarding command line interfaces. I cannot for the life of me get > > readline to work on the Windows version. If you use IPython, for > > example, readline works fantastically with smart ctrl-P search of > > previous commands and tab completion. Does anyone know of a way either > > to get readline to work or another good command line interface? > > Readline only works with US keyboard layouts under native windows, > that's why it's been turned off in the binary builds. You are left with > the very limited commandline editing in the default windows command shell. > > If you are using only US keyboard layout, you can rebuild psql from > source (using the MingW build system) with readline. You only need to > rebuild psql - not libpq or the backend itself. > > //Magnus > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq Regarding the faq, I did do a google search site on various permutations including the word readline but nothing of use turned up. I assumed that not many people had interest. I think it is a shame as I find in e.g., Python having the unix like shell capabilities to be a huge productivity enhancer. Someone replied separately that you can use just psql via cygwin to achieve the same result and this seems as if it might be easier. Any thoughts?
Couldn't this be offered pre-built as an alternative in the Windows installer or as a "psql2.exe" program? Seems like there might be more than a few PostgreSQL users running with US keyboard layouts under native Windows, and providing the prebuilt version along with the "normal" one might eliminate many of the postings like this that keep reappearing on these lists. - Bill > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of > Magnus Hagander > Sent: Saturday, August 04, 2007 3:09 PM > To: nac1967 > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] v8.2 ... command line interface on Windows > > > nac1967 wrote: > > I am a PostgreSQL user, using the native windows version > 8.2. I am new > > to PostgreSQL and am wondering if other users have suggestions > > regarding command line interfaces. I cannot for the life of me get > > readline to work on the Windows version. If you use IPython, for > > example, readline works fantastically with smart ctrl-P search of > > previous commands and tab completion. Does anyone know of a > way either > > to get readline to work or another good command line interface? > > Readline only works with US keyboard layouts under native > windows, that's why it's been turned off in the binary > builds. You are left with the very limited commandline > editing in the default windows command shell. > > If you are using only US keyboard layout, you can rebuild > psql from source (using the MingW build system) with > readline. You only need to rebuild psql - not libpq or the > backend itself. > > //Magnus > > > ---------------------------(end of > broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > http://www.postgresql.org/docs/faq
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. - Bill > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of nac1967 > Sent: Saturday, August 04, 2007 3:01 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] v8.2 ... command line interface on Windows > > > I am a PostgreSQL user, using the native windows version 8.2. > I am new to PostgreSQL and am wondering if other users have > suggestions regarding command line interfaces. I cannot for > the life of me get readline to work on the Windows version. > If you use IPython, for example, readline works fantastically > with smart ctrl-P search of previous commands and tab > completion. Does anyone know of a way either to get readline > to work or another good command line interface? > > Thank you. > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster >
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bill Bartlett wrote: >> Readline only works with US keyboard layouts under native >> windows, that's why it's been turned off in the binary >> builds. You are left with the very limited commandline >> editing in the default windows command shell. >> >> If you are using only US keyboard layout, you can rebuild >> psql from source (using the MingW build system) with >> readline. You only need to rebuild psql - not libpq or the >> backend itself. This seems odd, perhaps two psql.exe builds? psql.exe which would default with readline and psql_noreadline.exe which wouldn't? Joshua D. Drake >> >> //Magnus >> >> >> ---------------------------(end of >> broadcast)--------------------------- >> TIP 3: Have you checked our extensive FAQ? >> > http://www.postgresql.org/docs/faq > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org/ > - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL Replication: http://www.commandprompt.com/products/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGtSaxATb/zqfZUUQRAtDWAJ4qhlnuRLYHHIcHh6aHlqHoEZozHQCgpPdq Wt8WUFLiXOwlJdPUO0JHB+A= =gctt -----END PGP SIGNATURE-----
On Aug 4, 5:23 pm, bbartl...@softwareanalytics.com ("Bill Bartlett") wrote: > Couldn't this be offered pre-built as an alternative in the Windows > installer or as a "psql2.exe" program? Seems like there might be more > than a few PostgreSQL users running with US keyboard layouts under > native Windows, and providing the prebuilt version along with the > "normal" one might eliminate many of the postings like this that keep > reappearing on these lists. > > - Bill > > > > > -----Original Message----- > > From: pgsql-general-ow...@postgresql.org > > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of > > Magnus Hagander > > Sent: Saturday, August 04, 2007 3:09 PM > > To: nac1967 > > Cc: pgsql-gene...@postgresql.org > > Subject: Re: [GENERAL] v8.2 ... command line interface on Windows > > > nac1967 wrote: > > > I am a PostgreSQL user, using the native windows version > > 8.2. I am new > > > to PostgreSQL and am wondering if other users have suggestions > > > regarding command line interfaces. I cannot for the life of me get > > > readline to work on the Windows version. If you use IPython, for > > > example, readline works fantastically with smart ctrl-P search of > > > previous commands and tab completion. Does anyone know of a > > way either > > > to get readline to work or another good command line interface? > > > Readline only works with US keyboard layouts under native > > windows, that's why it's been turned off in the binary > > builds. You are left with the very limited commandline > > editing in the default windows command shell. > > > If you are using only US keyboard layout, you can rebuild > > psql from source (using the MingW build system) with > > readline. You only need to rebuild psql - not libpq or the > > backend itself. > > > //Magnus > > > ---------------------------(end of > > broadcast)--------------------------- > > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org/ Your suggestion makes a lot of sense to me. In fact, given the number of compiler options that exist for the Unix/Linux build, the Windows build is surprisingly devoid of options.
nac1967 wrote: > On Aug 4, 5:23 pm, bbartl...@softwareanalytics.com ("Bill Bartlett") > wrote: >> Couldn't this be offered pre-built as an alternative in the Windows >> installer or as a "psql2.exe" program? Seems like there might be more >> than a few PostgreSQL users running with US keyboard layouts under >> native Windows, and providing the prebuilt version along with the >> "normal" one might eliminate many of the postings like this that keep >> reappearing on these lists. >> >> - Bill >> >> >> >>> -----Original Message----- >>> From: pgsql-general-ow...@postgresql.org >>> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of >>> Magnus Hagander >>> Sent: Saturday, August 04, 2007 3:09 PM >>> To: nac1967 >>> Cc: pgsql-gene...@postgresql.org >>> Subject: Re: [GENERAL] v8.2 ... command line interface on Windows >>> nac1967 wrote: >>>> I am a PostgreSQL user, using the native windows version >>> 8.2. I am new >>>> to PostgreSQL and am wondering if other users have suggestions >>>> regarding command line interfaces. I cannot for the life of me get >>>> readline to work on the Windows version. If you use IPython, for >>>> example, readline works fantastically with smart ctrl-P search of >>>> previous commands and tab completion. Does anyone know of a >>> way either >>>> to get readline to work or another good command line interface? >>> Readline only works with US keyboard layouts under native >>> windows, that's why it's been turned off in the binary >>> builds. You are left with the very limited commandline >>> editing in the default windows command shell. >>> If you are using only US keyboard layout, you can rebuild >>> psql from source (using the MingW build system) with >>> readline. You only need to rebuild psql - not libpq or the >>> backend itself. >>> //Magnus >>> ---------------------------(end of >>> broadcast)--------------------------- >>> TIP 3: Have you checked our extensive FAQ? >> http://www.postgresql.org/docs/faq >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 4: Have you searched our list archives? >> >> http://archives.postgresql.org/ > > Your suggestion makes a lot of sense to me. In fact, given the number > of compiler options that exist for the Unix/Linux build, the Windows > build is surprisingly devoid of options. Not at all. All the options are there if you build from source, just like on Unix. The binary build has picked one set of options - just like the .deb build or the .rpm build has picked their sets of options. They pick the options that makes the *most* sense on their platform in *most* cases. If you need other options, you have to rebuild from source - just like on Windows. //Magnus