emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ob-sql posgresql windows problems
@ 2020-10-15  2:51 Neil Cherry
  2020-10-24 11:41 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Cherry @ 2020-10-15  2:51 UTC (permalink / raw)
  To: emacs-orgmode

I'm on a Windows 10 System, I'm using ob-sql.el and when I C-c C-c on the src block I
get:

'PGPASSWORD' os mpt recognized as an internal or external command.

Example block:

#+name: My queries (Not working - 'PGPASSWORD' is not recognized as an internal or external)
#+header: :engine postgresql
#+header: :dbhost pgdb.example.com
#+header: :dbuser user
#+header: :dbpassword password
#+header: :database db
#+begin_src sql
select count(*) from db.pserver
#+end_src

I've tried to use an elisp block to set the SHELL to the correct bash path but it
still calls cmd.

Any suggestions to help with debugging.

-- 
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ob-sql posgresql windows problems
  2020-10-15  2:51 ob-sql posgresql windows problems Neil Cherry
@ 2020-10-24 11:41 ` Bastien
  2020-10-26 12:00   ` Neil Cherry
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2020-10-24 11:41 UTC (permalink / raw)
  To: Neil Cherry; +Cc: emacs-orgmode

Hi Neil,

Neil Cherry <ncherry@linuxha.com> writes:

> I'm on a Windows 10 System, I'm using ob-sql.el and when I C-c C-c
> on the src block I get:

What version of Org are you using?  M-x org-version RET

Thanks,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ob-sql posgresql windows problems
  2020-10-24 11:41 ` Bastien
@ 2020-10-26 12:00   ` Neil Cherry
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Cherry @ 2020-10-26 12:00 UTC (permalink / raw)
  To: Org Mode

On 10/24/20 7:41 AM, Bastien wrote:
> Hi Neil,
> 
> Neil Cherry <ncherry@linuxha.com> writes:
> 
>> I'm on a Windows 10 System, I'm using ob-sql.el and when I C-c C-c
>> on the src block I get:
> 
> What version of Org are you using?  M-x org-version RET
> 
> Thanks,
> 

Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ c:/Users/NC1951/Documents/emacs-26.1/share/emacs/26.1/lisp/org/)

I did fix the issue by adding an if clause for Windows NT. It was caused by the
PGPASSORD being used before the command when it shouldn't have been there. I have
Postgres password file setup for the machine I want to access. Since the change it's
been working very well.

I think you're going to suggest that I upgrade my Windows machine to the latest.
I'll need to find that command after I backup my machine.

-- 
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-26 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15  2:51 ob-sql posgresql windows problems Neil Cherry
2020-10-24 11:41 ` Bastien
2020-10-26 12:00   ` Neil Cherry

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