[R] Problem connecting to database via RPostgreSQL/RS-DBI: "could not connect" error

andrewH ahoerner at rprogress.org
Wed Feb 5 12:16:25 CET 2014


On Feb 03, 2014; 7:24am, hadley wickham wrote: 
> Or you're not running a postgres db on your local machine with that
> accepts a connection with username Administrator and no password?  I
> doubt that's the error you would see if RPostgreSQL hadn't found
> libpq.

I have learned enough since this posting to be aware that my question was
based on assumptions so false to fact that they verge on the nonsensical,
but not enough to reframe it more sensibly. So I am just going to say what I
believed then and what I believe now, and perhaps you can head off the more
extreme excursions from reality in my current beliefs.

Because I knew that libpq depended on the version of PostgreSQL that was
installed, and that it used to be the case that you could not just install
the package, but it is now possible because of the addition of libpq, I
concluded that libpq contained an installer for PostgreSQL. I now think that
this is false, and that libpq is some sort of tailored interface that varies
with the OS and the PostgreSQL version. Tailored where and by what, I still
don't know, but maybe I do not need to know.

Since I thought I had to use the version of PostgreSQL installed by libpq, I
did not try to independently install PostgreSQL. Now I think that PostgreSQL
has to be installed and working before you start to install RPostgreSQL, in
order, among other things, to get the right libpq contents or settings.

I spent most of a day trying to figure out how to do what I was thinking of
as a "strictly local installation" of PostgreSQL, meaning one that did not
connect to the internet via a port and TCP/IP. I now believe that there is
no such thing, at least on a Windows machine, or that doing so would be
complex and difficult, compared to a connection via a "machine-internal"
TCP/IP connection -- something I did not know existed until the day before
yesterday. 

For the last few days I have been trying, so far unsuccessfully, to install
PostgreSQL from the (misnamed) "one click" installer from  enterprisedb.com.
I have figured out that the installation and error logs are written to
stderr, and where my OS puts it. I've gone through the 40+ pages of log.
Although the log contains more than 2 dozen warnings and errors, I now
believe that all of the ones that matter derive in some way from this one:
"Executing batch file 'rad3BBD8.bat'...
'icacls' is not recognized as an internal or external command, operable
program or batch file."

. . . and that this means I am having some sort of problem with the Windows
XP/NT access control/permissions system. Unfortunately I know nothing
whatsoever about the Windows permission system. Learning about it is the
next thing on my list. 

I am really quite good at framing feasible research agendas to address
important policy questions on a shoestring. I'm good with regression, with
displaying complicated argument in sensible graphics. I am new to using
databases on my own behalf (rather than having someone to do it for me), but
I am finding the query side of databases elegant and intuitive. But I am not
a competent IT/sysadmin/tech support person, and I am not going to be one
soon, or maybe ever. So I find it somewhat disheartening that I am spending
so much time being just that. 

Still, I am very grateful for the help and support of this list and the
various Stack Exchange lists, which have made possible such learning as I
have been able to accomplish.  Like the glaciers, my progress is slow but
inexorable. Or so I like to believe. 
 
Warmest regards, andrewH








--
View this message in context: http://r.789695.n4.nabble.com/Problem-connecting-to-database-via-RPostgreSQL-RS-DBI-could-not-connect-error-tp4684534p4684775.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list