Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7E04-00068i-Ts for pgsql-bugs@arkaria.postgresql.org; Sun, 07 May 2017 04:40:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d7E03-0002z9-3L for pgsql-bugs@arkaria.postgresql.org; Sun, 07 May 2017 04:40:51 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d7DzK-0001hM-Ss for pgsql-bugs@postgresql.org; Sun, 07 May 2017 04:40:06 +0000 Received: from mail.aegee.org ([144.76.142.78]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7DzG-0006PV-OX for pgsql-bugs@postgresql.org; Sun, 07 May 2017 04:40:06 +0000 Authentication-Results: aegeeserv.aegee.org; auth=pass (PLAIN) smtp.auth=didopalauzov DKIM-Filter: OpenDKIM Filter v2.10.3 mail.aegee.org v474fKZW011232 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aegee.org; s=k4096; t=1494132080; i=dkim+MSA-tls@aegee.org; r=y; bh=t6p4mbZHRi2WgoZtvLQKiBiUpPFjzZ7OO0iJmbFFbSo=; h=Subject:To:References:From:Date:In-Reply-To; b=Hgj9+z9X2Id2d45zvwgvSI5/gHZq6kxTFnD9Fhh+tFtqqNB+g1HCL8K5SOoX9dasq YwvnwliYxs93HbwVuxcoC/XMS9RAfgODHCGMNrR5ORWug/h6ux928dwD7BO9nPhayF o2nCbnKoaw2pMBv5+IVoSoaWb2pj+/tiKkoulGtW2pH9m/bKAbUR2vszQ1OuMBzUcv /LxbeYqDNX+YsHOYdqRR3IH7LK4QtEUVRNxrFp/luqnuVymF3yGN6T9ADJ6FAsw+ZD 7Cp6Kg/RVSiUGR5bb0Sc2tgJYfxmuYIt1ML1Z6p3PBW5Pj0kPzjtdOcDKTJRJOeykM JjikskZ6emG3JOy5MtxiL4eGdgGtsSTQ5BfyVOPnYogK/VsEn3GGyWOG/qRJktuEF2 dHEHKKnkmYQDH/FYkSfBkfKfQyfrdGe4vEUcd/iCwfqDN6ZjJtLw/RlaWDscBvINpq XrBss0vaohGZWJQMmk3Eyj4UjBEG7OMvmIaS/1/gR5oKfHmbDCpa+s56a8XBcOwVmS /SVCHVpLIzN6gAeY3+usodFO7NZX5w2nDSW2iPXhHxQqxH742t5ZxX5TFMJavRFLSM ybZvmDghX198cWary4KRjZuAA0avkenaYNxPOOuAnrKLg5G6NxEBydNLvgWgBX7L3E mwBkJgijq8eEzgQoVMDi741Y= Authentication-Results: mail.aegee.org; dkim=none Received: from [192.168.178.39] (x5f74f7c7.dyn.telefonica.de [95.116.247.199]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id v474fKZW011232 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 7 May 2017 04:41:20 GMT Subject: Re: psql history and "-- lines" To: pgsql-bugs@postgresql.org References: <48b3a5ac-d219-6568-6751-260b1387bc37@aegee.org> <19006.1494033923@sss.pgh.pa.us> <7127.1494112662@sss.pgh.pa.us> From: =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= Message-ID: <13522a02-1e1e-ef0c-2dd3-e6b532f5ac87@aegee.org> Date: Sun, 7 May 2017 06:40:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <7127.1494112662@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.99.2 at mail.aegee.org X-Virus-Status: Clean X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hello, if there is no consensus, on whether --lines should substitute a separate entry in the history, then make it an .psqlrc/CLI option. For psql/HISTSIZE, please update the documentation to state, that HISTSIZE -1 disables the file truncation. About the concerns with rl_variable_bind("comment-begin", "--") regarding libreadline/libedit versions: you can put the change only on master and announce it for Pg10. If nobody objects within a year, this can be backported. Greetings Дилян On 05/07/2017 01:17 AM, Tom Lane wrote: > =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= writes: >> I expect that psql and the shell, e.g. bash, behave in the same way in >> regards to history logs and until-the-current-line comments. > > I do not think that the shell necessarily provides a gold-plated precedent > for us to follow. The language syntax it's dealing with is substantially > different from SQL. Even ignoring that point, there are a lot of shell > implementations with a lot of different interactive behaviors; who's to > say that bash is the one true way? > >> + rl_variable_bind("comment-begin", "--"); > > Interesting thought, but IIUC that's a setting that would be better left > to the user's ~/.inputrc, or might indeed override something he's put > there. I'm also dubious how well it works across all the versions of > readline and libedit that are out there. > > Perhaps we could document suggested settings for people to put into > ~/.inputrc: > > $if psql > set comment-begin "-- " > ... other things? > $endif > > > regards, tom lane > -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs