Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YHct0-0002yy-7K for pgsql-bugs@arkaria.postgresql.org; Sat, 31 Jan 2015 18:35:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YHcsz-0002PF-0O for pgsql-bugs@arkaria.postgresql.org; Sat, 31 Jan 2015 18:35:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YHcsx-0002O0-18 for pgsql-bugs@postgresql.org; Sat, 31 Jan 2015 18:35:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YHcss-0003Ei-MK for pgsql-bugs@postgresql.org; Sat, 31 Jan 2015 18:35:08 +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 t0VIZ0xb018268; Sat, 31 Jan 2015 13:35:00 -0500 From: Tom Lane To: hans@matfyz.cz cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12721: psql -a does not preserve empty lines between SELECTs In-reply-to: <20150131173738.2581.57661@wrigleys.postgresql.org> References: <20150131173738.2581.57661@wrigleys.postgresql.org> Comments: In-reply-to hans@matfyz.cz message dated "Sat, 31 Jan 2015 17:37:38 +0000" Date: Sat, 31 Jan 2015 13:35:00 -0500 Message-ID: <18267.1422729300@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 hans@matfyz.cz writes: > There is, in the [doc] that psql with option -a echoes all input lines. Hm. That's poorly phrased: what it actually echoes is commands, not lines. This must be so because some of the other possible settings of ECHO require decisions at the per-command level. I will see about improving the wording here. > The empty line has disappeared. If there had been a comment line, it would > have been preserved. Preserve also empty lines, please. Sorry, that's not going to happen. psql has always stripped whitespace appearing before a command, and changing that would create a lot of unhappiness in a lot of other behaviors. > PS: Please, is there a better way how to specify tab as delimiter? Maybe put \pset fieldsep '\t' in the input .sql file, instead of setting it up on the command line. 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