From 8285763b973fe038c1970040cfc77473372f8d9f Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 8 Jan 2014 09:56:21 -0700 Subject: [PATCH] update psql command to respect :colnames Suggested by Joost Helberg on the Mailing list. TINYCHANGE * lisp/ob-sql.el (org-babel-execute:sql): Update psql command to respect :colnames. --- lisp/ob-sql.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index bee457b1b..7b85df8a1 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -123,7 +123,8 @@ This function is called by `org-babel-execute-src-block'." (org-babel-process-file-name in-file) (org-babel-process-file-name out-file))) ('postgresql (format - "psql --set=\"ON_ERROR_STOP=1\" -A -P footer=off -F \"\t\" -f %s -o %s %s" + "psql --set=\"ON_ERROR_STOP=1\" %s -A -P footer=off -F \"\t\" -f %s -o %s %s" + (if colnames-p "" "-t") (org-babel-process-file-name in-file) (org-babel-process-file-name out-file) (or cmdline ""))) -- 2.11.4.GIT