Thread: Confusion
Hello list, Can someone please fill me up on the state of affairs with ODBC support? I tried to search docs and FAQs but it is confusing as hell. I need to understand relation between unixODBC per say and --with-unixODBC option. The latter seem to produce libpsqlodbc.so, how it is different from libodbcpsql.so, produced when I build standalone unixODBC? Which one should be used? Release notes in unixODBC package suggest there have been bug fixes related to Postgres driver lately... Also any hints about usage with PHP would be very appreciated. Both postgres and unixODBC appear to have odbc.ini and odbcinst.ini files, which ones should be used to set envars in the PHP scripts? Thanks, - igor
Igor Kovalenko wrote: > > Hello list, > > Can someone please fill me up on the state of affairs with ODBC support? > I tried to search docs and FAQs but it is confusing as hell. > > I need to understand relation between unixODBC per say and > --with-unixODBC option. This(--with-unixODBC) option was added in PostgreSQL recently and you can produce the driver for unixODBC. OTOH unixODBC has provided its own odbcpsql driver because PostgreSQL didn't provide the driver for unixODBC until recently. Probably the 2 drivers are pretty different each other currently. > The latter seem to produce libpsqlodbc.so, Really ? It would produce libodbcpsql.so. regards, Hiroshi Inoue
Hiroshi Inoue wrote: > > Igor Kovalenko wrote: > > > > Hello list, > > > > Can someone please fill me up on the state of affairs with ODBC support? > > I tried to search docs and FAQs but it is confusing as hell. > > > > I need to understand relation between unixODBC per say and > > --with-unixODBC option. > > This(--with-unixODBC) option was added in PostgreSQL > recently and you can produce the driver for unixODBC. > OTOH unixODBC has provided its own odbcpsql driver > because PostgreSQL didn't provide the driver for unixODBC > until recently. Probably the 2 drivers are pretty different > each other currently. Does the driver supplied with postgres depend on something else? I do not see any dependencies in the library other than standard system libs. Is that normal or my build is broken? It also appears to be impossible to build PHP without installing unixODBC, due to missing headers. Postgres comes only with headers for iODBC (isql.h, isqlext.h, iodbc), but NOT for unixODBC (sql.h, sqlext.h, odbc.h). I need to use unixODBC because there's no iDOBC binaries for my platform and I did not find source either. > > > The latter seem to produce libpsqlodbc.so, > > Really ? It would produce libodbcpsql.so. Not for me. --with-unixODBC produces libpsqlodbc.so in my case. - igor
Igor Kovalenko wrote: > > Hiroshi Inoue wrote: > > > > Igor Kovalenko wrote: > > > > > > Hello list, > > > > > > Can someone please fill me up on the state of affairs with ODBC support? > > > I tried to search docs and FAQs but it is confusing as hell. > > > > > > I need to understand relation between unixODBC per say and > > > --with-unixODBC option. > > > > This(--with-unixODBC) option was added in PostgreSQL > > recently and you can produce the driver for unixODBC. > > OTOH unixODBC has provided its own odbcpsql driver > > because PostgreSQL didn't provide the driver for unixODBC > > until recently. Probably the 2 drivers are pretty different > > each other currently. > > Does the driver supplied with postgres depend on something else? I do > not see any dependencies in the library other than standard system libs. > Is that normal or my build is broken? --with-unixODBC may be wrong. Probably it must be --with-unixodbc. --with-unixodbc or --with-iodbc needs the each package(unixODBC/ iODBC) installed at the build time. regards, Hiroshi Inoue
Hiroshi Inoue wrote: > > Igor Kovalenko wrote: > > > > Hiroshi Inoue wrote: > > > > > > Igor Kovalenko wrote: > > > > > > > > Hello list, > > > > > > > > Can someone please fill me up on the state of affairs with ODBC support? > > > > I tried to search docs and FAQs but it is confusing as hell. > > > > > > > > I need to understand relation between unixODBC per say and > > > > --with-unixODBC option. > > > > > > This(--with-unixODBC) option was added in PostgreSQL > > > recently and you can produce the driver for unixODBC. > > > OTOH unixODBC has provided its own odbcpsql driver > > > because PostgreSQL didn't provide the driver for unixODBC > > > until recently. Probably the 2 drivers are pretty different > > > each other currently. > > > > Does the driver supplied with postgres depend on something else? I do > > not see any dependencies in the library other than standard system libs. > > Is that normal or my build is broken? > > --with-unixODBC may be wrong. Probably it must be --with-unixodbc. No, it is --with-unixODBC. That's what i see in the configure. > --with-unixodbc or --with-iodbc needs the each package(unixODBC/ > iODBC) installed at the build time. If I need unixODBC installed, why would I want to use --with-unixODBC at all? I'd already have postgres driver from unixODBC package. This option should either be made self-sufficient or removed, or at least explained much better. As it stands now it is useless and provides nothing but confusion. Apparently PHP's --with-unixODBC can not be used together with Postgres's --with-unixODBC as well, because build options in PHP assume some stuff present in unixODBC but not in Postgres. Anyway, let's assume I manage my way through that maze somehow. Where is documentation on odbc.ini and odbcinst.init files? Installation seems to have only odbc.ini, but I don't believe that will be enough. Documentation also does not describe system wide configuration, only user-specific. Or perhaps I just don't see it. - igor
Igor Kovalenko wrote: > > Hiroshi Inoue wrote: > > > > --with-unixODBC may be wrong. Probably it must be --with-unixodbc. > > No, it is --with-unixODBC. That's what i see in the configure. What *configure* are you using ? I see no --with-unixODBC in PostgreSQL's configure. > > > --with-unixodbc or --with-iodbc needs the each package(unixODBC/ > > iODBC) installed at the build time. > > If I need unixODBC installed, why would I want to use --with-unixODBC at > all? I'd already have postgres driver from unixODBC package. This option > should either be made self-sufficient or removed, or at least explained > much better. Sorry I'm not good at English and I couldn't explain it well. Probably someone would do it. AFAIK unixODBC team would like to unify the 2 drivers into the one which PostgreSQL provides but currently they are still separate. regards, Hiroshi Inoue