emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] ob-sql should escape the password [9.7.3 (9.7.3-2f1844 @ /home


From: Phil
Subject: Re: [BUG] ob-sql should escape the password [9.7.3 (9.7.3-2f1844 @ /home/andrea/.emacs.d/elpa/org-9.7.3/)]
Date: Fri, 7 Jun 2024 02:20:44 +0200
User-agent: Mozilla Thunderbird

* [2024-06-07 00:58] Andrea:
org-babel-execute:sql. This function extracts
the password to connect to your database of choice as dbpassword.
It then uses it like this:

        (format "PGPASSWORD=%s " dbpassword)

If the password contains an & character, the execution of a block fails.
I solved like this:
         (format "PGPASSWORD='%s' " dbpassword)

shell-quote-argument is designed for this case.

Phil



reply via email to

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