Re: psql command line editing - Mailing list pgsql-general

From Ben Hancock
Subject Re: psql command line editing
Date
Msg-id 8efb6910-0332-4794-86b8-8375daed1159@alm.com
Whole thread Raw
In response to Re: psql command line editing  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Marcelo Fernandes
Date:
Subject: Re: Best Approach for Swapping a Table with its Copy
Next
From: Adrian Klaver
Date:
Subject: Re: Best Approach for Swapping a Table with its Copy