Updates to page on using psqlodbc with Debian

Поиск
Список
Период
Сортировка
Искать

Updates to page on using psqlodbc with Debian

От:
Oliver Elphick <olly@lfix.co.uk>
Дата:
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
Amendments: 16 July 2002
Amendments: 17 March 2003
+Amendments: 10 August 2005
Description: Debian Linux: HOWTO set up odbc-postgresql with unixodbc to allow access to other Unix programs

@@ -138,17 +139,17 @@ 2. Add a PostgreSQL driver to /etc/odbcinst.ini:

-

# odbcinst -i -d -f /usr/lib/postgresql/share/odbcinst.ini.template
+

# odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template
3. Add the template1 database (with read only access) to the default odbc.ini

-
# cat /usr/lib/postgresql/share/odbc.ini.template >>/etc/odbc.ini
+
# cat /usr/share/doc/odbc-postgresql/examples/odbc.ini.template >>/etc/odbc.ini
Edit /etc/odbc.ini as required, to add extra databases, change the read only status and so on.

-4. Add ODBC required functions to the databases that you wish to access - from ODBC:

+4. For release 07 of psqlodbc, add ODBC required functions to the +databases that you wish to access from ODBC:

# su -s /bin/bash - postgres
@@ -160,8 +161,10 @@ If you include template1 in the list, any database created in future will automatically have these functions included when it is created.

-

+For release 08, step 4 is not required, because the driver does the conversion automatically. + +

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

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.

@@ -195,7 +195,7 @@

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.

Sample odbcinst.ini file

Re: Updates to page on using psqlodbc with Debian

От:
Oliver Elphick <olly@lfix.co.uk>
Дата:
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
Amendments: 16 July 2002
Amendments: 17 March 2003
+Amendments: 10 August 2005
Description: Debian Linux: HOWTO set up odbc-postgresql with unixodbc to allow access to other Unix programs

@@ -138,30 +139,32 @@ 2. Add a PostgreSQL driver to /etc/odbcinst.ini:

-

# odbcinst -i -d -f /usr/lib/postgresql/share/odbcinst.ini.template
+

# odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template
3. Add the template1 database (with read only access) to the default odbc.ini

-
# cat /usr/lib/postgresql/share/odbc.ini.template >>/etc/odbc.ini
+
# cat /usr/share/doc/odbc-postgresql/examples/odbc.ini.template >>/etc/odbc.ini
Edit /etc/odbc.ini as required, to add extra databases, change the read only status and so on.

-4. Add ODBC required functions to the databases that you wish to access - from ODBC:

+4. For release 07 of psqlodbc, add ODBC required functions to the +databases that you wish to access from ODBC:

# su -s /bin/bash - postgres
$ for dbname in database1 database2 ...
  do
-     psql -d $dbname < /usr/lib/psqlodbc/odbc.sql
+     psql -d $dbname < /usr/share/psqlodbc/odbc.sql
  done
If you include template1 in the list, any database created in future will automatically have these functions included when it is created.

-

+For release 08, step 4 is not required, because the driver does the conversion automatically. + +

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

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.

@@ -195,7 +195,7 @@

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.

Sample odbcinst.ini file

Re: Updates to page on using psqlodbc with Debian

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:
 

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

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
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

От:
Oliver Elphick <olly@lfix.co.uk>
Дата:
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

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
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.
FAQ