Skip site navigation (1) Skip section navigation (2)

Re: 7.1 odbc bug & patch

From: Dave Bodenstab <imdave(at)mcs(dot)net>
To: Inoue(at)tpf(dot)co(dot)jp, pgman(at)candle(dot)pha(dot)pa(dot)us
Cc: imdave(at)mcs(dot)net, pgsql-patches(at)postgresql(dot)org
Subject: Re: 7.1 odbc bug & patch
Date: 2001-06-13 16:27:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
As long as I'm on the cc list here... let me add $.02

What little documentation I found was in:


In section 7.2 Installation, it states:

  The installation-wide configuration file odbcinst.ini will be
  installed into the directory /usr/local/pgsql/etc/, or equivalent,
  depending on what --prefix and/or --sysconfdir options you supplied
  to configure. Since this file can also be shared between different
  ODBC drivers you can also install it in a shared location. To do
  that, override the location of this file with the --with-odbcinst

This led *me* to believe that when I configure and install postgress

  --enable-odbc \
  --with-odbcinst=/usr/local/etc \

then postgress would actually *use* /usr/local/etc/odbcinst.ini.
It didn't.  There was no mention of looking in the current directory
or looking in $HOME.  When I ktrace'd my test program, I found that
an odbcinst.ini file *was* being searched for, but only in . and
$HOME.  Finally tracking it down, I found the reason in gpps.c (and
found questionable and buggy code also.)  In fact, the only reference
to the installed odbcinst.ini (ODBCINST_INI) is in dlg_specific.c,
in code that is never called unless WIN32 is #defined, and even if
#defined, it's attempting to *update* the file.  It was obvious
that the code did not match the available doc's.  Since it wasn't
obvious whether or not odbcinst.ini should be searched for in .
and $HOME, I left that logic alone.  I only added a final search
for ODBCINST_INI which, finally, makes it do what the documentation
states that it should.  (The buggy code is another story... that
should be removed/fixed regardless of whether the search is
augmented.)  End of story... the patch got things working.

There are, perhaps, other problems... I don't know.  I only played
with this stuff in an attempt to learn about ``odbc'' stuff.  When
I ktrace'd libiodbc, it wanted its own "odbc.ini" file.  I would
think that they would use the same file name... but since I don't
have any doc's on how things are supposed to work, I have not investigated
further.  In any event, both libiodbc and tclodbc require database
specific libraries -- for postgres, src/interfaces/odbc/ -- so I
would expect that postgres would supply working (with respect to
its own documentation) code.

Dave Bodenstab


pgsql-patches by date

Next:From: Marko KreenDate: 2001-06-13 16:44:33
Subject: Re: reset all update
Previous:From: Bruce MomjianDate: 2001-06-13 15:54:28
Subject: Re: Patch to include PAM support...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group