Can't access views from Base (postgres odbc)

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
yrebrac
Posts: 12
Joined: Sat Mar 13, 2010 3:16 am

Can't access views from Base (postgres odbc)

Post by yrebrac »

I get a curios error when trying to access any view from my database (see screenshot). The error is that the column 'ctid' can't be found, but this column is not part of my schema. It might possibly be part of the underlying view implementation in postgres. I have no problems accessing actual tables.

Are there any known issues accessing views from open office? I am guessing this is more likely a driver issue, but worth asking. I am using the psqlodbc_08_04_0200 driver.
Attachments
screenshot
screenshot
OpenOffice 3.2.1 on Windows 7 64-bit
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Can't access views from Base (postgres odbc)

Post by r4zoli »

I get same error with ODBC connection, in JDBC I can access without problem on win7. May be it is an ODBC driver problem. See similar problem in earlier version of postgres and ODBC driver, issue 10229.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
yrebrac
Posts: 12
Joined: Sat Mar 13, 2010 3:16 am

Re: Can't access views from Base (postgres odbc)

Post by yrebrac »

That bug does seem to point to a driver problem.. I'll post this over on the postgres forums.
But it would be handy to know if there is an OO workaround or if there is an alternate driver.
I tried the SDBC driver but this does not seem to support SSL which is required on my server. Does the JDBC support SSL?
OpenOffice 3.2.1 on Windows 7 64-bit
yrebrac
Posts: 12
Joined: Sat Mar 13, 2010 3:16 am

Re: Can't access views from Base (postgres odbc)

Post by yrebrac »

Just found this: http://dba.openoffice.org/FAQ/specific.html#postgresql
It's a little confusing whether these are 'official' drivers or not, but I'll give them a try.
OpenOffice 3.2.1 on Windows 7 64-bit
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Can't access views from Base (postgres odbc)

Post by r4zoli »

This page a little outdated not refreshed from long time.

I found this mail, I hope it help you with JDBC SSL.
And this find a blog: http://quasiroot.wordpress.com/2007/07/ ... -over-ssl/
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Can't access views from Base (postgres odbc)

Post by r4zoli »

AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Can't access views from Base (postgres odbc)

Post by r4zoli »

The problem is that Postgres doesn't support updateable cursor for views.
See in postgres mailing list from 2004: http://archives.postgresql.org/pgsql-od ... g00045.php
I'm not so old on OOo to know it.

The issue with ODBC driver, and solution, how OOo handle it, similar problem could happen with some IBM product.
See in dba user mailing list: http://permalink.gmane.org/gmane.comp.o ... devel/3038

The code, needs to be added to the file which use ODBC connection:

Code: Select all

Dim settings as Object
  settings = ThisDatabaseDocument.DataSource.Settings
  settings.RespectDriverResultSetType = TRUE
  ThisDatabaseDocument.store
Please add to subject line [Solved].
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Post Reply