[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave-database - data entry into database table
From: |
Olaf Till |
Subject: |
Re: octave-database - data entry into database table |
Date: |
Sun, 17 Feb 2013 19:53:11 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Sat, Feb 16, 2013 at 07:37:21PM +0000, richard wrote:
> On Mon, Feb 11, 2013 at 10:40:12AM +0100, Olaf Till wrote:
> >
> > If you are more specific on the problems (including which Octave
> > version, which operating system, method of installing the old package
> > (binary package or source install with Octaves 'pkg'), used method of
> > uninstalling it (if any), method of installing the new package, error
> > messages you are seeing) there might be ways to help.
> >
> I have reinstalled database-2.0.0 with the following results:
> (for details of OS, Octave and email, please see my earlier post)
>
> # Downloaded database-2.0.0.tar.gz and unpacked.
> # in /src, ran ./autogen.sh,
Running autogen.sh should only be necessary for SVN checkouts, and not
with downloaded packages, as database-2.0.0.tar.gz. It could be safer
not to run it if it isn't necessary.
> ./configure and $ make
> while there were no error messages or warnings output,
> there were some errors recorded in config.log
Errors except 'error: ac_nonexistent.h: No such file or directory'
would interest me if they occur with the pre-generated configure
(without running autogen at your machine).
> and
> the process appeared to have completed successfully.
> # to check, removing pq_interface.oct and running make again gives:
> mkoctfile -o pq_interface.oct -lpq __pq_connect__.o pq_close.o pq_exec.o
> converters.o converters_arr_comp.o pq_connection.o command.o
> pq_update_types.o pq_lo.o
>
> #create a tar.gz file
> tar cvzf database-2.0.0.tar.gz database-2.0.0
The safest thing should be to use the pre-generated package
database-2.0.0.tar.gz as you downloaded it.
> #then as root, run octave
> octave > pkg install database-2.0.0.tar.gz
> # this wipes the old /database-1.0.4 directory
> # and replaces it with this:
> /usr/share/octave/packages/database-2.0.0$ ls -l
> total 36
> -rw-r--r-- 1 root root 2043 Feb 16 18:17 __all_db_opts__.m
> drwxr-xr-x 3 root root 4096 Feb 16 18:17 doc
> -rw-r--r-- 1 root root 3575 Feb 16 18:17 doc-cache
> -rw-r--r-- 1 root root 1776 Feb 16 18:17 getdbopts.m
> drwxr-xr-x 2 root root 4096 Feb 16 18:17 packinfo
> -rw-r--r-- 1 root root 33 Feb 16 18:17 PKG_ADD
> -rw-r--r-- 1 root root 7686 Feb 16 18:17 pq_connect.m
> -rw-r--r-- 1 root root 3327 Feb 16 18:17 setdbopts.m
> # quit octave and restart as a normal user, and see if pq_connect is there
> octave:2> news pq_connect
wrong, correct is: news database
> error: Package 'pq_connect' is not installed.
> error: called from:
> error: /usr/share/octave/3.6.2/m/miscellaneous/news.m at line 39, column 7
> # check for pq_interface
> octave:1> pq_interface
There is no function 'pq_interface' in the database package.
> panic: Segmentation fault -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Segmentation fault
I don't know what caused this segfault. It has probably nothing to do
with the database package. I don't see the segfault on my system.
> # Maybe I should file this as a bug report?
No.
> Richard
To summarize:
Try to use the package as downloaded without changing int (as root:
octave:..> pkg install -auto database-2.0.0.tar.gz)
(Not root anymore:
octave:..> news database
octave:..> help pq_connect
octave:..> help pq_exec_params
octave:..> help pq_close
... (as needed)
There are examples as demos, they require a local postgresql, a
database 'test', and permissions to create tables:
octave:..> demo pq_connect
Also, you could look at the tests at the end of the file pq_connect.m.
Olaf
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: Digital signature
- octave-swig-database-1.0.4 - data entry into database table, richard, 2013/02/10
- Re: octave-swig-database-1.0.4 - data entry into database table, Olaf Till, 2013/02/10
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/11
- Re: octave-database - data entry into database table, richard, 2013/02/16
- Re: octave-database - data entry into database table,
Olaf Till <=
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/17
- Message not available
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/18
- Message not available
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/18
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/18
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/18
- Re: octave-database - data entry into database table, Jordi GutiƩrrez Hermoso, 2013/02/18
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/18
- Re: octave-database - data entry into database table, richard, 2013/02/18
- Re: octave-database - data entry into database table, richard, 2013/02/18
- Re: octave-database - data entry into database table, Olaf Till, 2013/02/18