Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvAyW-00022N-BN for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Jan 2013 18:11:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TvAyV-0006GK-Qd for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Jan 2013 18:11:03 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvAyU-0006FS-My for pgsql-bugs@postgresql.org; Tue, 15 Jan 2013 18:11:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvAyP-00032C-W0 for pgsql-bugs@postgresql.org; Tue, 15 Jan 2013 18:11:02 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r0FIAubu029142; Tue, 15 Jan 2013 13:10:56 -0500 (EST) From: Tom Lane To: Heikki Linnakangas cc: 1584171677@qq.com, pgsql-bugs@postgresql.org Subject: Re: BUG #7811: strlen(NULL) cause psql crash In-reply-to: <50F591E4.2080508@vmware.com> References: <50F591E4.2080508@vmware.com> Comments: In-reply-to Heikki Linnakangas message dated "Tue, 15 Jan 2013 19:29:08 +0200" Date: Tue, 15 Jan 2013 13:10:56 -0500 Message-ID: <29141.1358273456@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 Heikki Linnakangas writes: > That'd change the behavior of all sprintf calls, not sure we want to go > there. I don't think so; especially since the proposed fix doesn't help on systems where we are using the native printf. > I committed a local fix to help.c to print "none" as the database name > when not connected. I think that patch could use more thought. As is, it will print connect to new database (currently "none") which to me is claiming that we are connected to a database whose name is "none". The quotes should not be used in this situation, and in fact it would be better for translatability if the whole message text were specialized to this case. I'd like to see it reading more like connect to new database (currently no connection) 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