pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Дилян Палаузов <dpa-postgres@aegee.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: psql and readline comments
Date: Fri, 25 Jan 2019 19:18:01 -0500
Message-ID: <20190126001801.GL13803@momjian.us> (raw)
In-Reply-To: <82eab8ea-5d9d-efab-dcc8-d7713d2b0645@2ndquadrant.com>
References: <201901141559.ne4yhv2nwsl5@alvherre.pgsql>
	<82eab8ea-5d9d-efab-dcc8-d7713d2b0645@2ndquadrant.com>

On Fri, Jan 18, 2019 at 09:18:09AM +0100, Peter Eisentraut wrote:
> On 14/01/2019 16:59, Alvaro Herrera wrote:
> > I agree -- it doesn't make sense to treat the insert-comment command as
> > inserting a #, which is not a comment for psql.  I use meta-# often in
> > bash and I'm never happy to have to resort to manually prepending "--"
> > in psql in order to make the current line a comment instead.
> 
> I have found
> 
> rl_variable_bind("comment-begin",";");
> 
> in the clisp code, so it seems it's not unheard of to do this sort of thing.

Agreed.  I am not sure how someone would conditionally bind M-# to --
_only_ in psql, so it seems doing it in psql might be the logical, and
only choice.  I see rl_variable_bind() referenced in libedit:

	https://android.googlesource.com/platform/external/libedit/+/refs/heads/master/src/readline.c

so I think we are good in applying this to master.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +




view thread (13+ messages)  latest in thread

Message-ID: <20190126001801.GL13803@momjian.us>
Permalink:  ../20190126001801.GL13803@momjian.us/
Also on:    postgresql.org/message-id/20190126001801.GL13803@momjian.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com, dpa-postgres@aegee.org, tgl@sss.pgh.pa.us
  Subject: Re: psql and readline comments
  In-Reply-To: <20190126001801.GL13803@momjian.us>
  References: <201901141559.ne4yhv2nwsl5@alvherre.pgsql> <82eab8ea-5d9d-efab-dcc8-d7713d2b0645@2ndquadrant.com> <20190126001801.GL13803@momjian.us>

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

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