From: Stefano Rodighiero <firstname.lastname@example.org>
To: Kyle Meyer <email@example.com>
Cc: Daniel Kraus <firstname.lastname@example.org>, email@example.com
Subject: Re: [PATCH] ob-sql: Respect database param when using dbconnection
Date: Mon, 1 Jun 2020 10:20:52 +0200 [thread overview]
Message-ID: <CABuLN4yPhg3a=qdYWG8Dg4gtVqgYn4=4LzSXBKAAcLTeBSX-PQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]
On Mon, Jun 1, 2020 at 4:16 AM Kyle Meyer <firstname.lastname@example.org> wrote:
Daniel Kraus writes:
> > I use ob-sql with the :dbconnection param so I don't have my username
> and password in my org file.
> > But often I don't want to use the default database from the dbconnection
> alist but
> > rather specify it explicitly with :database.
> > Attached is a patch that fixes this.
Thank you @Daniel
> From what I can gather from your description, this looks reasonable.
> I'm not an ob-sql user, so perhaps I missing something, but would it
> make sense for any connection parameter to take precedence if explicitly
> given in the source block header (i.e. something like the patch below)?
> [+cc Stefano, who added the :dbconneciton feature.]
I think it makes sense.
(I personally handle cases like those described by Daniel differently,
keeping distinct sql-connection-alist entries for each DB
param combination I might need, but I can imagine why someone
would want to "override" the database or the host params.
For port, user and password I have more difficulties imagining a
case where combinations of those params would need override,
but I think @Kyle's generic solution is better)
[-- Attachment #2: Type: text/html, Size: 2095 bytes --]
next prev parent reply other threads:[~2020-06-01 8:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 15:17 [PATCH] ob-sql: Respect database param when using dbconnection Daniel Kraus
2020-06-01 2:16 ` Kyle Meyer
2020-06-01 8:20 ` Stefano Rodighiero [this message]
2022-10-31 7:02 ` Daniel Kraus
2022-11-01 1:58 ` Ihor Radchenko
2022-11-02 15:48 ` Daniel Kraus
2022-11-03 7:15 ` Ihor Radchenko
2022-11-03 8:28 ` Bastien Guerry
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).