Wed 25 Feb 2015 06:47:26 PM UTC, comment #8:
Thanks, but still two things:
1. I wouldn't rely on 'pg_config --version' always prepending the program name, there might be versions (maybe in the future) in which only the version number is printed. This was cared for by the previous regular expression, could you do something similar with awk?
2. Can't
be written as
+verbatim
if ( $1 >= 8 && $2 >= 3 )
-verbatim-
?
Olaf
|
Wed 25 Feb 2015 05:48:35 PM UTC, comment #7:
(this is Claudius, the original submitter)
Wow, I spent the past three days in bed and now - going online - it's already fixed :)
I adapted configure.ac to check for the library version using awk (Tried PKG_CHECK_MODULES, but libpq doesn't register with pkg-config :()
-> removed the dependency on Octave
-> reduced the required Autoconf version to 2.59 (RHEL 5)
-> added dependency on awk. As Octave itself depends on awk, this shouldn't be a further limitation
-> Distributions on Cygwin don't include psql nor pg_config, so builds will probably fail there (same before the patch ;))
The RHEL 5 machine is my default testing target, as we have a homogenous Redhat landscape here (v5-v7). Wasn't my choice, but I can't complain too much.
(file #33185)
|
Tue 24 Feb 2015 10:16:31 AM UTC, comment #6:
Yes, something similar. Done and commit-ed to SVN. Olaf
|
Mon 23 Feb 2015 05:18:45 PM UTC, comment #5:
You could have a configure script that checks the psql version during installation and fail.
|
Mon 23 Feb 2015 04:21:04 PM UTC, comment #4:
Mike:
Quote from the original report, note the part after the last ",":
"So, would it be possible to catch this error and output a message like "Postgres minimum supported version is 8.3", or handle the error? (=not relying on typearray)"
Quote from my answer:
"I agree the package should explicitely require a minimal postgresql version, I'll care for this."
Olaf
|
Mon 23 Feb 2015 04:06:31 PM UTC, comment #3:
The original report doesn't seem to be asking for you to support postgresql < 8.3, just to add a better error message to catch whatever feature it is that requires 8.3 and report to the user something along the lines of "postgresql 8.3 or newer is required".
|
Mon 23 Feb 2015 03:44:52 PM UTC, comment #2:
Seeing your report I considered to handle postgresql < 8.3, if possible, but the necessary changes seem to need much work and the code would probably be terrible. Sorry, but I don't think I'll undertake this. I'm glad to hear of somebody who tries to use the package, but couldn't you switch to a more recent GNU/Linux distribution (in Debian, e.g., you needn't pay for upgrades)? There might be more advantages in this than just having the database package.
I agree the package should explicitely require a minimal postgresql version, I'll care for this.
Thank you for the report anyway, although I actually could not help you ...
Olaf
|
Sun 22 Feb 2015 11:42:48 PM UTC, comment #1:
Adding maintainer of database package to cc list
|
Sun 22 Feb 2015 11:15:17 PM UTC, original submission:
I tried to connect to postgresql 8.1.23 (Current version on RHEL 5)
Connection fails with:
"
octave:14> et.db.pgconn = pq_connect(con_str);
error: octave_pq_fill_base_types: fatal error: ERROR: column "typarray" does not exist
error: could not read types
error: called from:
error: /usr/share/octave/packages/database-2.3.0/pq_connect.m at line 112, column 8
"
The error happens here:
http://sourceforge.net/p/octave/code/HEAD/tree/trunk/octave-forge/main/database/src/pq_connection.cc#l212
Checking through the Postgresql docs, I found:
"
The old naming convention is still honored when possible, but application code should no longer depend on it. Instead use the new pg_type.typarray column to identify the array data type associated with a given type.
"
(http://www.postgresql.org/docs/8.3/static/release-8-3.html)
Ok, they started with typearray at Postgresql 8.3...
RHEL 5 is still supported until March 31, 2017, but they won't upgrade anything except for critical issues.
So, would it be possible to catch this error and output a message like "Postgres minimum supported version is 8.3", or handle the error? (=not relying on typearray)
Claudius
|