Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gidJ8-0006rx-F6 for pgsql-bugs@arkaria.postgresql.org; Sun, 13 Jan 2019 10:47:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gidJ5-0002kI-Bw for pgsql-bugs@arkaria.postgresql.org; Sun, 13 Jan 2019 10:47:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gidJ5-0002kB-5j for pgsql-bugs@lists.postgresql.org; Sun, 13 Jan 2019 10:47:55 +0000 Received: from mail.aegee.org ([144.76.142.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gidJ1-0005qE-Uo for pgsql-bugs@postgresql.org; Sun, 13 Jan 2019 10:47:54 +0000 Authentication-Results: mail.aegee.org/x0DAlo9B005242; auth=pass (PLAIN) smtp.auth=didopalauzov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aegee.org; s=k4096; t=1547376471; i=dkim+MSA-tls@aegee.org; r=y; bh=UEmLRyQq8JPfpIdvsgJ1+xds/lCI3oEODITZEcO5JcY=; h=Subject:From:To:Date; b=YyjI5MRuyzzTg42oB6BC9nVp9K/KS3/e2oPy8kD7P4/UY3RdBrZWmqo0GG21T24Tp JESXaxmcR2qbpf0x3O7remkAZm6TZ9GwRHIkMHxBPeYl3BreAKgbODjtMltnQcYbJG /esSN+FQjBHBHBfhO12GKA2rrj6IwDJk8BmWoEOMzQttlMjQoYauy/6SCFqCR56c/7 821K7pjDT9h9yTYgnalFFIys35OmjQgECpmWEZ3PVwBXqvkrgTl22T7e4rbM/dy6wd pfotMZlF86VLWh6KoknIV/Slqe3J4kSTPgG7CSha0CK4QHXkDKSYYVeWh/k8rFIKil GDLCFroW0KOGZL0213xvIhPVd/BP9iq0xVIp2ABJdbchuCetPWI1DCPXOaRzFiVnZl 6pC0QSumZ9MBQzS3Q2TxURNiq/4OLyEDfEShqTLG7MYGuLptQbcc0PVZy8xBC+7+VE fgLjgiNKShX1Gksb32oF86cAjqiQzZfDs8n5epIAkdxecT/9FG72NskCpmDTUBoGfb LsJgipSgjsm8rjZ2OQG7Oi0+azvQ2TR6Vz4wmG7HYYuaPo6XtMVO0vIjWo/AnrSVgK 2DwLQo29jCGcNpMM6oSqRQ5M0ihd9N1ts40Gv61DyM+uzF2FAGuMkJn9Vm/h8BZvye YygFs20iGGbPP8hoWADc5fUc= Authentication-Results: mail.aegee.org/x0DAlo9B005242; dkim=none Received: from Tylan (adsl-62-167-97-198.adslplus.ch [62.167.97.198]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id x0DAlo9B005242 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 13 Jan 2019 10:47:51 GMT Message-ID: Subject: psql and readline comments From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= To: pgsql-bugs@postgresql.org Date: Sun, 13 Jan 2019 10:47:50 +0000 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.31.90 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.101.1 at mail.aegee.org X-Virus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. diff --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 Дилян