From d4b9dda2d83d9433858b8567a37538ddeabc926e Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 8 Apr 2016 14:05:33 +0200 Subject: [PATCH] ob-sql: patch for postgresql - patched dbpassword for babel-sql database postgresql. Sent patch to upstream. Set's environment variable for psql command. Without it no password login unless configured in psql configuration file. --- elpa/org-20160215/ob-sql.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elpa/org-20160215/ob-sql.el b/elpa/org-20160215/ob-sql.el index f096572e..1a5c5517 100644 --- a/elpa/org-20160215/ob-sql.el +++ b/elpa/org-20160215/ob-sql.el @@ -137,7 +137,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\" %s -A -P footer=off -F \"\t\" %s -f %s -o %s %s" + "%s psql --set=\"ON_ERROR_STOP=1\" %s -A -P footer=off -F \"\t\" %s -f %s -o %s %s" + (if dbpassword (concat "PGPASSWORD='" dbpassword "'") "") (if colnames-p "" "-t") (org-babel-sql-dbstring-postgresql dbhost dbuser database) (org-babel-process-file-name in-file) -- 2.47.3