From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joost Helberg Subject: patch for ob-sql and postgresql for supporting :colnames Date: Wed, 08 Jan 2014 13:58:46 +0100 Message-ID: <87bnzm4ol5.fsf@snow.nl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0siv-0002Fy-8r for emacs-orgmode@gnu.org; Wed, 08 Jan 2014 07:59:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0sio-0005eC-IC for emacs-orgmode@gnu.org; Wed, 08 Jan 2014 07:59:05 -0500 Received: from mx.snow.nl ([213.154.248.146]:54754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0sio-0005e8-BA for emacs-orgmode@gnu.org; Wed, 08 Jan 2014 07:58:58 -0500 Received: from imap.snow.nl (imap.snow.nl [213.154.248.156]) by mx.snow.nl (Postfix) with ESMTP id 5998840294 for ; Wed, 8 Jan 2014 13:58:31 +0100 (CET) Received: from w520jo (neerijnen.snow.nl [213.154.248.134]) by imap.snow.nl (Postfix) with ESMTPSA id AE9B22D64CD for ; Wed, 8 Jan 2014 13:58:46 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-Mode hi, the :colnames header argument is not honoured for postgresql. Hence the following patch for ob-sql.el. The command-line tool psql supports the option -t for not displaying column-names. The default behavious is not changed with this patch. 126,127c126 < "psql --set=\"ON_ERROR_STOP=1\" %s -A -P footer=off -F \"\t\" -f %s -o %s %s" < (if colnames-p "" "-t") --- > "psql --set=\"ON_ERROR_STOP=1\" -A -P footer=off -F \"\t\" -f %s -o %s %s" Can anyone suggest to me why this should not be in ob-sql.el? It is already implemented for the mysql engine (via -N). regards, Joost -- Snow B.V. http://snow.nl