emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Alan Light <lightalan@gmail.com>
Cc: Bastien <bzg@gnu.org>,
	emacs-orgmode@gnu.org, Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Bug fix attached: org-babel sql postgres, fix hardcode
Date: Wed, 03 Feb 2021 23:19:14 -0500	[thread overview]
Message-ID: <87wnvowjlp.fsf@kyleam.com> (raw)
In-Reply-To: <CAGvVPAyP4gug1Uif4MNLs-07GG7ncA4hpWOVs3V8FikXZ7HEQA@mail.gmail.com>

Thanks for the patch, and others for the review/feedback.

Alan Light writes:

> 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

I've squash this patch, which as Tom notes is a fixup on top of the
initial one, into the first.  I've also tweaked the commit message a
bit, including adding TINYCHANGE.

https://orgmode.org/worg/org-contribute.html#commit-messages

> ---
>  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

As Tom noted, the use of sql-postgres-program here leads to a
byte-compiler warning.  It probably makes sense to just require sql.el
in the file, but for now I've guarded this with a bound-and-true-p.

Pushed (862048d4c).  Thanks again.


      parent reply	other threads:[~2021-02-04  4:20 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
2020-12-13  0:52         ` Ihor Radchenko
2020-12-13  2:11           ` Tom Gillespie
2021-02-04  4:19         ` Kyle Meyer [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=87wnvowjlp.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=lightalan@gmail.com \
    --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).