diff options
author | Harri Kiiskinen <harri.kiiskinen@utu.fi> | 2010-09-17 13:06:45 -0400 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-09-17 13:06:45 -0400 |
commit | 52052e837aa3105eb6d23c4866c2c3e53ebac0c9 (patch) | |
tree | 44666fb59c7286c70607cedb5ae6972e8a83638e | |
parent | c19a04ec9f623ddcefa128648139fc849b1a557e (diff) | |
download | org-mode-52052e837aa3105eb6d23c4866c2c3e53ebac0c9.tar.gz |
ob-sql: support for postgresql
It achieves this in the same way the mysql support is done, by using
the psql client with suitable command line arguments.
-rw-r--r-- | lisp/ob-sql.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 4e1daa5..2636752 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -66,6 +66,8 @@ This function is called by `org-babel-execute-src-block'." (command (case (intern engine) ('mysql (format "mysql %s -e \"source %s\" > %s" (or cmdline "") in-file out-file)) + ('postgresql (format "psql -A -P footer=off -F \"\t\" -f %s -o %s %s" + in-file out-file (or cmdline ""))) (t (error "no support for the %s sql engine" engine))))) (with-temp-file in-file (insert (org-babel-expand-body:sql body params))) |