From: | Dave Cardwell <postgresql(dot)org(at)davecardwell(dot)co(dot)uk> |
---|---|
To: | pgsql-odbc(at)lists(dot)postgresql(dot)org |
Subject: | Configuring postgresql12-odbc to use the correct protocol version |
Date: | 2020-07-10 22:20:21 |
Message-ID: | CAPjm5WMg3UJ5A7=Pq2ta+Pb1+MrqLT0zVFZtXBffteTXz=ze=Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi there,
I have a Centos 7 box with unixODBC 2.3.1 and postgresql-odbc 12.02
installed, which is connecting to a PostgreSQL server also running
v12.
Although I believe I have configured ODBC to use the v12.0 protocol,
it does not seem to be. When connected to the server and attempting to
get a list of columns in a table I get the error, “column c.relhasoids
does not exist”. This column was removed from pg_catalog.pg_class in
PostgreSQL v12.
postgresql-odbc was specifically updated to not use this column when
the protocol is v12 so I can only assume I’m not:
https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=info.c;h=f19032147ee1794e9685e7bc88293df6769c49c9;hb=HEAD#l2352
I have Protocol = 12.0 in my /etc/odbcinst.ini and if I run `strace
isql my-connector` I can see it loading the postgresql12 libs from
/usr/pgsql-12 as configured.
I’m stumped!
# isql my-connector -v -3
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select id from roles where name = 'admin';
+------------+
| id |
+------------+
| 2 |
+------------+
SQLRowCount returns 1
1 rows fetched
SQL> help roles
[HY000]Error while executing the query
[42703]ERROR: column c.relhasoids does not exist
[ISQL]ERROR: Could not SQLColumns
# yum list installed | grep -i -e 'odbc' -e 'postgresql'
postgresql12-libs.x86_64 12.3-5PGDG.rhel7 @pgdg12
postgresql12-odbc.x86_64 12.02.0000-1PGDG.rhel7 @pgdg-common
unixODBC.x86_64 2.3.1-14.el7 @base
unixODBC-devel.x86_64 2.3.1-14.el7 @base
# cat /etc/odbc.ini
[my-connector]
Description = My PG connection
Driver = PostgreSQL12
Database = mydb
Servername = mydatabase.example.com
UserName = myself
Password = mypassword
Port = 25061
Protocol = 12.0
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
SSLMode = require
UseServerSidePrepare = No
# cat /etc/odbcinst.ini
[PostgreSQL12]
Description=ODBC for PostgreSQL
Setup=/usr/lib/libodbcpsqlS.so
Setup64=/usr/lib64/libodbcpsqlS.so
Driver=/usr/pgsql-12/lib/psqlodbcw.so
Driver64=/usr/pgsql-12/lib/psqlodbcw.so
FileUsage=1
Any advice you can offer would be greatly appreciated.
--
Best wishes,
Dave Cardwell.
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Wise | 2020-07-26 05:16:29 | [PATCH] reset-db test: use the common definition of env/conn |
Previous Message | Inoue, Hiroshi | 2020-07-03 11:25:17 | Re: PostgreSQL ODBC SQL_CONVERT_* in SQLGetInfo support |