emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Light <lightalan@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Bastien <bzg@gnu.org>, emacs-orgmode@gnu.org
Subject: Re: Bug fix attached: org-babel sql postgres, fix hardcode
Date: Sat, 12 Dec 2020 19:31:59 -0500	[thread overview]
Message-ID: <CAGvVPAyP4gug1Uif4MNLs-07GG7ncA4hpWOVs3V8FikXZ7HEQA@mail.gmail.com> (raw)
In-Reply-To: <877dpm7e3d.fsf@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 459 bytes --]

New patch file attached.


On Sat, Dec 12, 2020 at 7:14 PM Ihor Radchenko <yantar92@gmail.com> wrote:

> Alan Light <lightalan@gmail.com> writes:
>
> > Sorry, I don't understand. That's what I did. The patch was attached to
> my
> > email.
>
> You need to add patch description, not just title. Something like:
>
> * ob-sql.el (org-babel-execute:sql): Use `sql-postgres-program' as
>   postgresql executable (instead of psql) when defined.
>
> Best,
> Ihor
>

[-- Attachment #1.2: Type: text/html, Size: 869 bytes --]

[-- Attachment #2: 0002-ob-sql.el-ob-sql.el-org-babel-execute-sql-Use-sql-po.patch --]
[-- Type: application/octet-stream, Size: 1036 bytes --]

From 62329424577d9baa40cca3c98951c4b65a095002 Mon Sep 17 00:00:00 2001
From: Alan Light <lightalan@gmail.com>
Date: Sat, 12 Dec 2020 19:26:40 -0500
Subject: [PATCH 2/2] ob-sql.el: ob-sql.el (org-babel-execute:sql): Use
 `sql-postgres-program' as   postgresql executable (instead of psql) when
 defined

* ob-sql.el (org-babel-execute:sql): Use `sql-postgres-program' as
  postgresql executable (instead of psql) when defined. psql will be the default
---
 lisp/org/ob-sql.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el
index 8eca769d02..f46c6c1c6a 100644
--- a/lisp/org/ob-sql.el
+++ b/lisp/org/ob-sql.el
@@ -242,7 +242,7 @@ footer=off -F \"\t\"  %s -f %s -o %s %s"
 				  (if dbpassword
 				      (format "PGPASSWORD=%s " dbpassword)
 				    "")
-				  (or sql-postgres-program "psql")
+				  (or sql-postgres-program "psql") ;; default is psql
 				  (if colnames-p "" "-t")
 				  (org-babel-sql-dbstring-postgresql
 				   dbhost dbport dbuser database)
-- 
2.25.1


  reply	other threads:[~2020-12-13  0:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 16:39 Bug fix attached: org-babel sql postgres, fix hardcode Alan Light
2020-12-12 17:59 ` Bastien
2020-12-12 19:53   ` Alan Light
2020-12-13  0:18     ` Ihor Radchenko
2020-12-13  0:31       ` Alan Light [this message]
2020-12-13  0:52         ` Ihor Radchenko
2020-12-13  2:11           ` Tom Gillespie
2021-02-04  4:19         ` Kyle Meyer

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=CAGvVPAyP4gug1Uif4MNLs-07GG7ncA4hpWOVs3V8FikXZ7HEQA@mail.gmail.com \
    --to=lightalan@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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).