help-octave
[Top][All Lists]
Advanced

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

Re: database connection fails


From: Karen Kuhn
Subject: Re: database connection fails
Date: Thu, 5 Jan 2017 09:33:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0

Thanks for the answer!

Am 03.01.2017 um 18:47 schrieb Olaf Till:
On Tue, Jan 03, 2017 at 11:53:07AM +0100, Karen Kuhn wrote:
Hi all,

I tried to connect to a test database via

conn = pq_connect(setdbopts("host", "localhost","port", "5432","dbname",
"testdb", "user", "superx", "password", ""))

and get the error:

error: octave_pq_get_postgres_oid: could not convert given type tostring
error: could not read types
error: __pq_connect__ failed
error: called from:
error:   /usr/share/octave/packages/database-2.4.2/pq_connect.m atline 112,
column 8

Has anyone an idea where the problem might be and how I can get it work?
This is an error internal to the package. I still don't see why this
should occur, though I've identified the position in the package code
where the error seems to come from.
Yes, I did this too, but I'm not familiar with C++ and don't understand the reasons for the error. I also tried an empty database and get the same errors.
I'm working on a Debian 8.6 machine with octave 3.8.2 and postgresql 9.4.9.
I installed the packages struct 1.0.14 and database 2.4.2 without any
problem report via:

pkg install -global -verbose struct
pkg install -global -verbose database
Trying to reproduce the problem, I wonder why the above commands
should have worked:

- What was in the paths 'struct' and 'database' in the current
   directory? Where have you got it from?

- Did you run Octave as the root user? The -global option should only
   be necessary for a non-root user, but a non-root user on a normal
   Debian system shouldn't have permissions for a global install.
Sorry, I also used the -forge tag. And yes, recently I installed the packages as root user. At first the functions in the packages could not be found. So this was the last thing I tried, before I realized that I have explicitly to load the packages before I can use them ... That's also why I used the -global tag.
Have you any further version of Octave or its libraries installed on
your system?
I don't think so.
Have you possibly installed database both locally (under ~/octave/)
and system-wide?
No, I uninstalled the local ones I installed at first. 'pkg list' shows me only the system-wide installations.

Karen



reply via email to

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