Re: 7.1 odbc bug & patch
От | Hiroshi Inoue |
---|---|
Тема | Re: 7.1 odbc bug & patch |
Дата | |
Msg-id | 3B280A84.15DE3E3B@tpf.co.jp обсуждение исходный текст |
Ответ на | 7.1 odbc bug & patch (Dave Bodenstab <imdave@mcs.net>) |
Список | 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
В списке pgsql-patches по дате отправления: