Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XA5BR-0003es-Dv for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2014 22:38:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XA5BQ-0001FN-T1 for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2014 22:38:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XA5BP-0001FD-Ok for pgsql-bugs@postgresql.org; Wed, 23 Jul 2014 22:38:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XA5BM-00046Q-VR for pgsql-bugs@postgresql.org; Wed, 23 Jul 2014 22:38:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6NMcgTv029815; Wed, 23 Jul 2014 18:38:43 -0400 From: Tom Lane To: Robert Fleming cc: pgsql-bugs@postgresql.org Subject: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars In-reply-to: References: <20140723175629.27768.38545@wrigleys.postgresql.org> <23902.1406142767@sss.pgh.pa.us> Comments: In-reply-to Robert Fleming message dated "Wed, 23 Jul 2014 14:34:59 -0700" Date: Wed, 23 Jul 2014 18:38:42 -0400 Message-ID: <29814.1406155122@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Robert Fleming writes: > Yes, sorry, actually it's using libedit. Is that supported? Ah. We support libedit, but I'd not be a bit surprised if it does not cope well with non-printing characters ... A quick look into the readline.h supplied on my Mac OS X 10.9 machine (which is from libedit not GNU readline) says that it defines RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE, so at least in theory you'd expect it to work. A bit of experimentation says that it doesn't work all that well though compared to my Linux box :-(. Now, Apple has a long track record of shipping broken versions of libedit, so this doesn't prove a whole lot about what will happen on other platforms. I'd make sure that PG was compiled against a version of readline.h that provided definitions for RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE. If it was, then whatever misbehavior you're seeing can be blamed on libedit. If you're using an old version of libedit it's possible that a newer one would work better. But really, libedit is full of inadequacies; if you can possibly switch to GNU readline you'll probably be happier. 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