public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ben Hancock <[email protected]>
To: pgsql-general <[email protected]>
Cc: Rich Shepard <[email protected]>
Subject: Re: psql command line editing
Date: Wed, 12 Feb 2025 14:09:09 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CANzqJaCHXvZRC6xJbxg80DoWNmm-ohFP+u=VqpsXd6wtqXXpmw@mail.gmail.com>
	<[email protected]>
	<[email protected]>

On 2/12/2025 11:44, Rich Shepard wrote:
> I run psql from a urxvt virtual console, not emacs (which is where I 
> write scripts.)

As with everything in Emacs, there's a mode for that.

In case you're not aware of it, sql-mode allows you not only to interact
with psql from within Emacs, but also to write SQL queries in a buffer
and then send the whole buffer or the region.

It's not documented in the info pages, but from within Emacs, one of
these should get you started:

  C-h P sql
  M-x sql-help

Or just do: M-x sql-postgres

  - Ben






view thread (14+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: psql command line editing
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox