Emacs and postgres

Started by Sean Davisabout 21 years ago6 messagesgeneral
Jump to latest
#1Sean Davis
sdavis2@mail.nih.gov

This is a bit off-topic....

Does anyone know of an interface between emacs and psql? I currently
use it as my default editor and do my share of save and then \i. I
just gave pgEdit a try and liked many aspects of it, but I still like
Emacs as an editor and wondered if anyone else has tricks/plugins for
emacs users.

Sean

#2John DeSoi
desoi@pgedit.com
In reply to: Sean Davis (#1)
Re: Emacs and postgres

Hi Sean,

On Feb 23, 2005, at 4:19 PM, Sean Davis wrote:

Does anyone know of an interface between emacs and psql? I currently
use it as my default editor and do my share of save and then \i. I
just gave pgEdit a try and liked many aspects of it, but I still like
Emacs as an editor and wondered if anyone else has tricks/plugins for
emacs users.

Thanks for trying pgEdit. I know it can't ever be emacs, but let me
know if there are some particular things in the emacs compatibility
features that add, improve, or fix.

I'm keeping a blog now if you are interested in following pgEdit design
and development.

http://pgedit.com/blog/1

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

#3Joe Healy
joe@omc-international.com.au
In reply to: Sean Davis (#1)
Re: Emacs and postgres

Sean Davis wrote:

This is a bit off-topic....

Does anyone know of an interface between emacs and psql? I currently
use it as my default editor and do my share of save and then \i. I
just gave pgEdit a try and liked many aspects of it, but I still like
Emacs as an editor and wondered if anyone else has tricks/plugins for
emacs users.

I have used sql-postgres mode in the past, under both emacs and xemacs.
It is quite good. Haven't got it working currently under windows, I
think I need to tell it where i have a psql binary.

Joe

#4Joe Healy
joe@omc-international.com.au
In reply to: Joe Healy (#3)
Re: Emacs and postgres

Joe Healy wrote:

Sean Davis wrote:

This is a bit off-topic....

Does anyone know of an interface between emacs and psql? I currently
use it as my default editor and do my share of save and then \i. I
just gave pgEdit a try and liked many aspects of it, but I still like
Emacs as an editor and wondered if anyone else has tricks/plugins for
emacs users.

I have used sql-postgres mode in the past, under both emacs and
xemacs. It is quite good. Haven't got it working currently under
windows, I think I need to tell it where i have a psql binary.

I have now told emacs where my psql binary is, but I do not get the
prompt. Does anyone know how to change this?

Thanks

Joe

#5Randal L. Schwartz
merlyn@stonehenge.com
In reply to: Sean Davis (#1)
Re: Emacs and postgres

"Sean" == Sean Davis <sdavis2@mail.nih.gov> writes:

Sean> Does anyone know of an interface between emacs and psql? I currently
Sean> use it as my default editor and do my share of save and then \i. I
Sean> just gave pgEdit a try and liked many aspects of it, but I still like
Sean> Emacs as an editor and wondered if anyone else has tricks/plugins for
Sean> emacs users.

sql-mode works fairly nice, and has a postgres submode.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/&gt;
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

#6Bruce Momjian
bruce@momjian.us
In reply to: Sean Davis (#1)
Re: Emacs and postgres

Sean Davis <sdavis2@mail.nih.gov> writes:

This is a bit off-topic....

Does anyone know of an interface between emacs and psql? I currently use it as
my default editor and do my share of save and then \i. I just gave pgEdit a
try and liked many aspects of it, but I still like Emacs as an editor and
wondered if anyone else has tricks/plugins for emacs users.

You could just set EDITOR to emacsclient and run M-x server-start and use \e.

Personally I just use psql directly under something like shell-mode. That
doesn't give me completion but it gives me a history and editing.

--
greg