pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Дилян Палаузов <dpa-postgres@aegee.org>
To: pgsql-bugs@postgresql.org
Subject: psql and readline comments
Date: Sun, 13 Jan 2019 10:47:50 +0000
Message-ID: <b10ba6a38a7f02207ccd0a848c620d7176149e46.camel@aegee.org> (raw)

Hello,

please consider integrating making the usual readilne binding M-# do in psql what users expect from it: insert comment
at the beginning of the line.  See for patch:

https://www.postgresql.org/message-id/01e0355e-381e-9732-7d4e-cbd0e6bfa710@aegee.org

At 
https://www.postgresql.org/message-id/0afcbc3f-8c1c-c576-824a-5cc02e5a81e5@2ndquadrant.com was suggested to postpone
this for PG11.  Now you can integrate this on the master branch.


inline patch 1: src/bin/psql/input.c (+2/-0 lines) download inline-1.patchdiff --git a/src/bin/psql/input.c b/src/bin/psql/input.c --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -356,6 +356,8 @@ initializeInput(int flags) /* these two things must be done in this order: */ initialize_readline(); rl_initialize(); + if (!strcmp("#", rl_variable_value("comment-begin"))) + rl_variable_bind("comment-begin", "--"); useHistory = true; using_history();
Regards Дилян

view thread (13+ messages)  latest in thread

Message-ID: <b10ba6a38a7f02207ccd0a848c620d7176149e46.camel@aegee.org>
Permalink:  ../b10ba6a38a7f02207ccd0a848c620d7176149e46.camel@aegee.org/
Also on:    postgresql.org/message-id/b10ba6a38a7f02207ccd0a848c620d7176149e46.camel@aegee.org

 ·  · 

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: dpa-postgres@aegee.org
  Subject: Re: psql and readline comments
  In-Reply-To: <b10ba6a38a7f02207ccd0a848c620d7176149e46.camel@aegee.org>
  References: <b10ba6a38a7f02207ccd0a848c620d7176149e46.camel@aegee.org>

* 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