emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] add port switch for postgresql support in ob-sql.el


From: Justin Kirby
Subject: [O] [PATCH] add port switch for postgresql support in ob-sql.el
Date: Thu, 19 May 2016 19:37:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)


I added a port switch for postgresql in ob-sql.el

If you have sql loaded and do something like the follow:

#+name: example
#+header: :engine postgresql
#+header: :dbhost localhost
#+header: :dbport 6543
#+header: :dbuser orgmode
#+header: :database ob-sql
#+BEGIN_SRC sql
select * from everything
#+END_SRC

Note: default port for postrgres is 5432 not 6543

You will be either presented with an error or in my case a failed
password prompt since I had multiple db servers running. The problem was
that org-babel-sql-dbstring-postgresql did not accept a port argument.

I have attached a simple patch to fix this and have verified it works
for me. I would have loved to add some tests, but I ran into some
problems:

1) I could not figure out how to get just one test file to run
2) I was not able get make test to load the sql language in babel


Is there a recommended/standard way to resolve these problems with tests?

Attachment: 0001-add-dbport-parameter-to-postgresql-dbstring.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]