Re: 7.1 odbc bug & patch

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Dave Bodenstab <imdave(at)mcs(dot)net>
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, pgsql-patches(at)postgresql(dot)org
Subject: Re: 7.1 odbc bug & patch
Date: 2001-06-14 00:51:16
Message-ID: 3B280A84.15DE3E3B@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Dave Bodenstab wrote:
>
> As long as I'm on the cc list here... let me add $.02
>
> What little documentation I found was in:
>
> postgresql-7.1/doc/postgres/odbc-install.html
>
> 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
> option.
>

Could someone tell me where the above doc come from ?
Certainly both windows-ODBC and unixODBC need odbcinst.ini
but I couldn't find *odbcinst* in any iODBC doc/src.
In fact psqlodbc driver works with iODBC without odbcinst.ini.
I'm not familiar with ODBC under unix and am happy if someone
explains it.

> This led *me* to believe that when I configure and install postgress
> with:
>
> --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.

No psqlodbc really uses ODBCINST_INI under Windows and probably
under unix also. I could see
getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE)
in psqlodbc.c and environ.c.

[snip]

>
> 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.

Yes you are right.
There must be a documentation about how to let
the psqlodbc driver work with iDOBC though I don't
know who could do it. And someone should improve gpps.c.

Thanks,
Hiroshi Inoue

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-06-14 00:56:48 Re: Australian timezone configure option
Previous Message Chris Dunlop 2001-06-14 00:42:08 Re: Australian timezone configure option