Thread: Updates to page on using psqlodbc with Debian

Updates to page on using psqlodbc with Debian

From
Oliver Elphick
Date:
There are certain changes needed to
http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-debian
with the latest releases of psqlodbc and the Debian packages.  Attached
is a diff to the webpage source.

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
   Do you want to know God?   http://www.lfix.co.uk/knowing_god.html
--- genpage.php.html    2005-08-10 07:45:32.315419408 +0100
+++ genpage.php.html.new    2005-08-10 07:54:47.648770747 +0100
@@ -125,6 +125,7 @@
 Release Date: 17 April 2002<br>
 Amendments: 16 July 2002<br>
 Amendments: 17 March 2003<br>
+Amendments: 10 August 2005<br>
 Description: Debian Linux: HOWTO set up odbc-postgresql with unixodbc to allow access to other Unix programs
 </i>
 <br><br>
@@ -138,17 +139,17 @@
 
 <b>2.</b> Add a PostgreSQL driver to /etc/odbcinst.ini:<br><br>
 
-</font></p><blockquote><font size="-1"><i># odbcinst -i -d -f
/usr/lib/postgresql/share/odbcinst.ini.template</i></font></blockquote>
+</font></p><blockquote><font size="-1"><i># odbcinst -i -d -f
/usr/share/psqlodbc/odbcinst.ini.template</i></font></blockquote>
 
 <font size="-1"><b>3.</b> Add the template1 database (with read only access) to the default odbc.ini<br><br>
 
-</font><blockquote><font size="-1"><i># cat /usr/lib/postgresql/share/odbc.ini.template
>>/etc/odbc.ini</i></font></blockquote>
+</font><blockquote><font size="-1"><i># cat /usr/share/doc/odbc-postgresql/examples/odbc.ini.template
>>/etc/odbc.ini</i></font></blockquote>
 
 <font size="-1">   Edit /etc/odbc.ini as required, to add extra databases, change the read only
    status and so on.<br><br>
 
-<b>4.</b> Add ODBC required functions to the databases that you wish to access
-   from ODBC:<br><br>
+<b>4.</b> For release 07 of psqlodbc, add ODBC required functions to the
+databases that you wish to access from ODBC:<br><br>
 
 <i></i></font><blockquote>
 <font size="-1"><i>   # su -s /bin/bash - postgres<br>
@@ -160,8 +161,10 @@
 
 <font size="-1">   If you include template1 in the list, any database created in future will
    automatically have these functions included when it is created.<br><br>
-</font><p></p>
 
+For release 08, step 4 is not required, because the driver does the conversion automatically.
+
+</font><p></p>
 <p>
 <font size="-1">At this point, you should be able to use the ODBC access features of any
 application to connect to any of the listed databases.   For example, in
@@ -179,10 +182,7 @@
 <p>
 <font size="-1">You can create templates for different databases and allow users to add
 them to their own ~/.odbc.ini.  Use the odbc.ini template file provided in
-/usr/lib/postgresql/share/odbc.ini.template as a model.  Ignore the file
-/usr/lib/postgresql/lib/odbcinst.ini, which is provided by the postgresql
-package.  This may be good for use with iodbc, but I have no experience
-of using that.
+/usr/share/doc/odbc-postgresql/examples/odbc.ini.template as a model.
 </font></p>
 
 <p>
@@ -195,7 +195,7 @@
 <p>
 <font size="-1">Note: I have had a report that OpenOffice objects to tabs and/or whitespace
 in ~/.odbc.ini and /etc/odbc.ini.  I have not found this problem with
-StarOffice 5, however.
+StarOffice 5, however.  Neither does it seem to be a problem in openoffice.org 1.4.
 </font></p>
 
 <font size="-1"><b>Sample odbcinst.ini file</b>

Re: Updates to page on using psqlodbc with Debian

From
Oliver Elphick
Date:
On Wed, 2005-08-10 at 07:55 +0100, Oliver Elphick wrote:
> There are certain changes needed to
> http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-debian
> with the latest releases of psqlodbc and the Debian packages.  Attached
> is a diff to the webpage source.

That patch missed one path change.  A new patch is attached.
--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
   Do you want to know God?   http://www.lfix.co.uk/knowing_god.html
--- genpage.php.html    2005-08-10 07:45:32.000000000 +0100
+++ genpage.php.html.new    2005-08-10 10:40:10.340937831 +0100
@@ -125,6 +125,7 @@
 Release Date: 17 April 2002<br>
 Amendments: 16 July 2002<br>
 Amendments: 17 March 2003<br>
+Amendments: 10 August 2005<br>
 Description: Debian Linux: HOWTO set up odbc-postgresql with unixodbc to allow access to other Unix programs
 </i>
 <br><br>
@@ -138,30 +139,32 @@

 <b>2.</b> Add a PostgreSQL driver to /etc/odbcinst.ini:<br><br>

-</font></p><blockquote><font size="-1"><i># odbcinst -i -d -f
/usr/lib/postgresql/share/odbcinst.ini.template</i></font></blockquote>
+</font></p><blockquote><font size="-1"><i># odbcinst -i -d -f
/usr/share/psqlodbc/odbcinst.ini.template</i></font></blockquote>

 <font size="-1"><b>3.</b> Add the template1 database (with read only access) to the default odbc.ini<br><br>

-</font><blockquote><font size="-1"><i># cat /usr/lib/postgresql/share/odbc.ini.template
>>/etc/odbc.ini</i></font></blockquote>
+</font><blockquote><font size="-1"><i># cat /usr/share/doc/odbc-postgresql/examples/odbc.ini.template
>>/etc/odbc.ini</i></font></blockquote>

 <font size="-1">   Edit /etc/odbc.ini as required, to add extra databases, change the read only
    status and so on.<br><br>

-<b>4.</b> Add ODBC required functions to the databases that you wish to access
-   from ODBC:<br><br>
+<b>4.</b> For release 07 of psqlodbc, add ODBC required functions to the
+databases that you wish to access from ODBC:<br><br>

 <i></i></font><blockquote>
 <font size="-1"><i>   # su -s /bin/bash - postgres<br>
    $ for dbname in database1 database2 ...<br>
      do<br>
-       psql -d  $dbname < /usr/lib/psqlodbc/odbc.sql<br>
+       psql -d  $dbname < /usr/share/psqlodbc/odbc.sql<br>
      done<br>
 </i></font></blockquote>

 <font size="-1">   If you include template1 in the list, any database created in future will
    automatically have these functions included when it is created.<br><br>
-</font><p></p>

+For release 08, step 4 is not required, because the driver does the conversion automatically.
+
+</font><p></p>
 <p>
 <font size="-1">At this point, you should be able to use the ODBC access features of any
 application to connect to any of the listed databases.   For example, in
@@ -179,10 +182,7 @@
 <p>
 <font size="-1">You can create templates for different databases and allow users to add
 them to their own ~/.odbc.ini.  Use the odbc.ini template file provided in
-/usr/lib/postgresql/share/odbc.ini.template as a model.  Ignore the file
-/usr/lib/postgresql/lib/odbcinst.ini, which is provided by the postgresql
-package.  This may be good for use with iodbc, but I have no experience
-of using that.
+/usr/share/doc/odbc-postgresql/examples/odbc.ini.template as a model.
 </font></p>

 <p>
@@ -195,7 +195,7 @@
 <p>
 <font size="-1">Note: I have had a report that OpenOffice objects to tabs and/or whitespace
 in ~/.odbc.ini and /etc/odbc.ini.  I have not found this problem with
-StarOffice 5, however.
+StarOffice 5, however.  Neither does it seem to be a problem in openoffice.org 1.4.
 </font></p>

 <font size="-1"><b>Sample odbcinst.ini file</b>

Re: Updates to page on using psqlodbc with Debian

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Oliver Elphick
> Sent: 10 August 2005 10:42
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Updates to page on using psqlodbc with Debian
>
> On Wed, 2005-08-10 at 07:55 +0100, Oliver Elphick wrote:
> > There are certain changes needed to
> >
> http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-debian
> > with the latest releases of psqlodbc and the Debian
> packages.  Attached
> > is a diff to the webpage source.
>
> That patch missed one path change.  A new patch is attached.

Thanks Oliver. I've applied the patch, but had to do so manually because
of the way the pages are generated. Could you give it a once over and
make sure I didn't make any mistakes please?

Regards, Dave.

Re: Updates to page on using psqlodbc with Debian

From
Peter Eisentraut
Date:
Am Donnerstag, 11. August 2005 10:04 schrieb Dave Page:
> Thanks Oliver. I've applied the patch, but had to do so manually because
> of the way the pages are generated. Could you give it a once over and
> make sure I didn't make any mistakes please?

It might be best to simply delete the page and tell people to consult the
README.Debian file that accompanies the Debian package.  Some of the updated
contents are already outdated again or will be soon.

Re: Updates to page on using psqlodbc with Debian

From
Oliver Elphick
Date:
On Sun, 2005-08-14 at 12:44 +0200, Peter Eisentraut wrote:
> Am Donnerstag, 11. August 2005 10:04 schrieb Dave Page:
> > Thanks Oliver. I've applied the patch, but had to do so manually because
> > of the way the pages are generated. Could you give it a once over and
> > make sure I didn't make any mistakes please?
>
> It might be best to simply delete the page and tell people to consult the
> README.Debian file that accompanies the Debian package.  Some of the updated
> contents are already outdated again or will be soon.

Is there something similar in the source package?  Your solution is OK
for Debian users; is there anything equivalent for other distributions?
--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
   Do you want to know God?   http://www.lfix.co.uk/knowing_god.html


Re: Updates to page on using psqlodbc with Debian

From
Peter Eisentraut
Date:
Am Sonntag, 14. August 2005 19:36 schrieb Oliver Elphick:
> Is there something similar in the source package?  Your solution is OK
> for Debian users; is there anything equivalent for other distributions?

Perhaps the issue is more generally that the ODBC driver source distribution
does not contain any noticeable documentation. If that were to be written,
some of the existing material under consideration here could be adopted and
generalized.