11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.24 2001/09/13 15:55:23 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.25 2001/10/09 22:32:32 petere Exp $
33-->
44
55 <chapter id="odbc">
@@ -80,39 +80,69 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.24 2001/09/13 15:55:23
8080 <title>Installation</title>
8181
8282 <para>
83- The first thing to note about the <productname>psqlODBC</> driver
84- (or any <acronym>ODBC</> driver) is that there must exist a
85- <firstterm>driver manager</> on the system where the
86- <acronym>ODBC</> driver is to be used. There exists a free
87- <acronym>ODBC</> driver for Unix called
88- <indexterm><primary>iODBC</primary></indexterm>
89- <productname>iODBC</> which can be obtained via <ulink
90- url="http://www.iodbc.org">http://www.iodbc.org</ulink>.
91- Instructions for installing <productname>iODBC</> are contained in
92- the <productname>iODBC</> distribution. Having said that, any
93- driver manager that you can find for your platform should support
94- the <productname>psqlODBC</> driver, or any other <acronym>ODBC</>
95- driver for that matter.
83+ In order to make use of an <acronym>ODBC</> driver there must
84+ exist a <firstterm>driver manager</> on the system where the
85+ <acronym>ODBC</> driver is to be used. There are two free
86+ <acronym>ODBC</> driver managers for Unix-like operating systems
87+ known to us: <indexterm><primary>iODBC</primary></indexterm>
88+ <ulink url="http://www.iodbc.org"><productname>iODBC</></ulink>
89+ and <indexterm><primary>unixODBC</primary></indexterm> <ulink
90+ url="http://www.unixodbc.org"><productname>unixODBC</></ulink>.
91+ Instructions for installing these driver managers are to be found
92+ in the respective distribution. Software that provides database
93+ access through <acronym>ODBC</acronym> should provide its own
94+ driver manager (which may well be one of these two). Having said
95+ that, any driver manager that you can find for your platform
96+ should support the <productname>PostgreSQL</> <acronym>ODBC</>
97+ driver, or any other <acronym>ODBC</> driver for that matter.
98+ </para>
99+
100+ <note>
101+ <para>
102+ The <productname>unixODBC</> distribution ships with a
103+ <productname>PostgreSQL</> <acronym>ODBC</> driver of its own,
104+ which is similar to the one contained in the
105+ <productname>PostgreSQL</> distribution. It is up to you which
106+ one you want to use. We plan to coordinate the development of
107+ both drivers better in the future.
108+ </para>
109+ </note>
110+
111+ <para>
112+ To install the <acronym>ODBC</> you simply need to supply the
113+ <option>--enable-odbc</> option to the <filename>configure</>
114+ script when you are building the entire <productname>PostgreSQL</>
115+ distribution. The library will then automatically be built and
116+ installed with the rest of the programs. If you forget that option
117+ or want to build the ODBC driver later you can change into the
118+ directory <filename>src/interfaces/odbc</> and do <literal>make</>
119+ and <literal>make install</> there.
96120 </para>
97121
98122 <para>
99- To install <productname>psqlODBC</> you simply need to supply the
100- <option>--enable-odbc</> option to the <filename>configure</> script when you are
101- building the entire <productname>PostgreSQL</> distribution. The library
102- and header files will then automatically be built and installed with the
103- rest of the programs. If you forget that option or want to build the ODBC
104- driver later you can change into the directory <filename>src/interfaces/odbc</>
105- and do <literal>make</> and <literal>make install</> there.
123+ It is also possible to build the driver to be specifically tuned
124+ for use with <productname>iODBC</> or <productname>unixODBC</>.
125+ This means in particular that the driver will use the driver
126+ manager's routines to process the configuration files, which is
127+ probably desirable since it creates a more consistent
128+ <acronym>ODBC</> environment on your system. If you want to do
129+ that, then supply the <filename>configure</> options
130+ <option>--with-iodbc</> or <option>--with-unixodbc</> (but not
131+ both).
106132 </para>
107133
108134 <para>
109- The installation-wide configuration file <filename>odbcinst.ini</> will be
110- installed into the directory <filename>/usr/local/pgsql/etc/</>, or equivalent,
111- depending on what <option>--prefix</> and/or <option>--sysconfdir</> options
112- you supplied to <filename>configure</>. Since this file can also be shared
113- between different <acronym>ODBC</> drivers you can also install it in a shared
114- location. To do that, override the location of this file with the
115- <option>--with-odbcinst</> option.
135+ If you build a <quote>stand-alone</quote> driver (not tied to
136+ <productname>iODBC</> or <productname>unixODBC</>), then you can
137+ specify where the driver should look for the configuration file
138+ <filename>odbcinst.ini</>. By default it will be the directory
139+ <filename>/usr/local/pgsql/etc/</>, or equivalent, depending on
140+ what <option>--prefix</> and/or <option>--sysconfdir</> options
141+ you supplied to <filename>configure</>. To select a specific
142+ location outside the <productname>PostgreSQL</> installation
143+ layout, use the <option>--with-odbcinst</> option. To be most
144+ useful, it should be arranged that the driver and the driver
145+ manager read the same configuration file.
116146 </para>
117147
118148 <para>
@@ -125,20 +155,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.24 2001/09/13 15:55:23
125155psql -d template1 -f <replaceable>LOCATION</>/odbc.sql
126156</programlisting>
127157 where specifying <literal>template1</literal> as the target
128- database will ensure that all subsequent new databases will
129- have these same definitions.
158+ database will ensure that all subsequent new databases will have
159+ these same definitions. If for any reason you want to remove
160+ these functions again, run the file
161+ <filename>odbc-drop.sql</filename> through
162+ <command>psql</command>.
130163 </para>
131-
132- <sect2>
133- <title>Supported Platforms</title>
134- <para>
135- <productname>psqlODBC</productname> has been built and tested
136- on <systemitem class="osname">Linux</>. There have been reports of success
137- with <systemitem class="osname">FreeBSD</> and with <systemitem class="osname">Solaris</>. There are no known restrictions
138- on the basic code for other platforms which already support
139- <productname>Postgres</productname>.
140- </para>
141- </sect2>
142164 </sect1>
143165
144166 <sect1 id="odbc-config">