Re: Version compatibility

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Version compatibility
Date: 2025-03-01 18:31:11
Message-ID: a40fce91-c028-41ae-a623-4c938871c343@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/1/25 14:17, Igor Korot wrote:

Reply to list also.
Ccing list.

Comments inline.

> Hi, Adrian,
> On Sat, Mar 1, 2025 at 11:23 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 3/1/25 13:15, Igor Korot wrote:
> > Hi, ALL,
> > I have PostgreSQL version 13 and ODBC driver version 11
> > on my Gentoo box.
> >
> > Are they compatible? Can I still connect to the server?
>
> Have you tried to make a connection?
>
>
> Tried.
>
> [code]
> IgorsGentoo/home/igor/dbhandler_new/Debug #cat /etc/unixODBC/odbcinst.ini
> Trace=yes
> TraceFile=/tmp/sql.log
> [PostgreSQL]
> Description=PostgreSQL drver
> Driver=/usr/lib64/psqlodbcw.so
>
> IgorsGentoo/home/igor/dbhandler_new/Debug #cat /etc/unixODBC/odbc.ini
> [PostgreSQL]
> Driver=PostgreSQL
> Server=localhost
> PORT=5432
> DATABASE=draft
> OOPTION=3
> USER=postgres
> PASSWORD=wasqra
> IgorsGentoo/home/igor/dbhandler_new/Debug #
>
> igor(at)IgorsGentoo~/dbhandler/Debug $isql -v PostgreSQL
> [IM002][unixODBC][Driver Manager]Data source name not found and no
> default driver specified
> [ISQL]ERROR: Could not SQLConnect
> igor(at)IgorsGentoo~/dbhandler/Debug $
>
> [/code]

From:

https://www.mankier.com/1/isql

"DSN

The Data Source Name (DSN) used to connect to the SQL database.
unixODBC looks for the specified DSN in /etc/odbc.ini and
$HOME/.odbc.ini, with the latter taking precedence.
"

Do you have a $HOME/.odbc.ini?

Also in odbc.ini, per man odbc.ini, I believe you have to have something
like:

[ODBC Data Sources]
Postgresql = This is my Postgres DSN.

From man odbc.ini:

"[ODBC Data Sources] section

The required section [ODBC Data Sources] lists each data source name
(DSN) as a key. The associated values serve as comments. Each entry
must be matched by an ini file [section] describing the data source.
"

> I'd like to develop backward compatible software which is compatible
> with the oldest possible combination..

Not following.
From my experiences with the ODBC driver it is backwards compatible, so
I would think using a more recent version would be the preferred solution.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2025-03-02 00:57:28 Re: Version compatibility
Previous Message Adrian Klaver 2025-03-01 17:23:54 Re: Version compatibility