From: "Eric Schulte" <schulte.eric@gmail.com>
To: Harri Kiiskinen <harri.kiiskinen@utu.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Postgresql support for ob-sql.el
Date: Fri, 17 Sep 2010 13:18:11 -0400 [thread overview]
Message-ID: <87iq2447cc.fsf@gmail.com> (raw)
In-Reply-To: <20100915.170202.401240283.harri.kiiskinen@utu.fi> (Harri Kiiskinen's message of "Wed, 15 Sep 2010 17:02:02 +0300 (EEST)")
Thanks Harri!
I've just applied this patch to the repository.
If you think you'll want to contribute patches longer than 10 lines
please consider the FSF assignment process described at
http://orgmode.org/worg/org-contribute.php
Thanks -- Eric
Harri Kiiskinen <harri.kiiskinen@utu.fi> writes:
> The attaches patch adds support to postgresql to ob-sql.el
>
> It achieves this in the same way the mysql support is done, by using
> the psql client with suitable command line arguments.
>
> Best,
>
> Harri Kiiskinen
> harkiisk@gmail.com
>
> 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)))
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
prev parent reply other threads:[~2010-09-17 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 14:02 [PATCH] Postgresql support for ob-sql.el Harri Kiiskinen
2010-09-17 17:18 ` Eric Schulte [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iq2447cc.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=harri.kiiskinen@utu.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).