From: Joshua D. Drake <jd@commandprompt.com>
To: ricardd@mathstat.dal.ca
Cc: unixodbc-support@easysoft.com
Cc: pgsql-odbc@postgresql.org
Subject: Re: UNRESOLVED: odbc driver manager and postgresql odbc driver
Date: Wed, 14 Jun 2006 13:44:30 -0700
Message-ID: <4490752E.5060302@commandprompt.com> (raw)
In-Reply-To: <60652.24.222.143.8.1150313824.squirrel@24.222.143.8>
References: <60652.24.222.143.8.1150313824.squirrel@24.222.143.8>
> 2 - postgresql needs an odbc driver so that it can be accessible through ODBC
>
> 3 - get unixodbc up and running to enable ODBC on the system by using the
> above driver to connect to postgresql
>
>
> So I'm still at #2/#3. Here is what I don't understand:
>
> 1 - Is the postgresql driver procided by unixodbc appropriate or obsolete?
You should use the postgresql driver that is provided by the
distribution you are running. If you are running windows download the exe.
So for Ubuntu:
apt-get install odbc-postgresql
> I don't really understand earlier replies on this (see below). The Ubuntu
> packages "unixodbc-bin" and "unixodbc-dev" don't seem to include a
> postgreSQL driver, but the latest source code does. So I removed the
> packages and I'm now trying to build unixodbc from source. I get a build
> error from "lex.l" and can't access a promising message on the mailing
> list archive
> (mail.easysoft.com/pipermail/unixodbc-announce/2006-January/000004.html).
> I'm stuck.
odbc-postgresql is the driver
unixODBC is the driver manager.
So:
apt-get install unixodbc
> 2 - Is the Ubuntu package "odbc-postgresql" essentially the same as
> building psqlodbc from source?
Essentially yes. THe psqlodbc is probably more current but don't make
your life difficult.
If so, is this better than the unixodbc
> postgresql driver? Also, how do I use this driver in unixodbc since it
> doesn't have a "setup file"? Should I use iODBC instead of unixodbc?
>
No. Use unixODBC.
> 3 - What is the "setup file" supposed to look like anyway? I'd be happy to
> create it if I knew what it is supposed to be. Why is it so hard to find?
> I have the postgresql people telling me that it isn't from them but I
> couldn't find it from the unixodbc-bin and unixodbc-dev packages either.
Here are example working files:
/etc/odbc.ini:
[odbcng]
Description = Mammoth PostgreSQL
Driver = nobuffer
Trace = No
TraceFile =
Database = postgres
Servername = localhost
UserName = postgres
Password =
Port = 5432
Protocol = 7.0
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
/etc/odbcinst.ini:
[pgdg]
Description = PostgreSQL ODBC driver
Driver = /usr/lib/odbc/psqlodbc.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 0
CommLog = 1
UsageCount = 2
[nobuffer]
Description = PostgreSQL ODBC driver
Driver = /usr/local/lib/libmodbc.so
Debug = 0
CommLog = 1
UsageCount = 2
USE_BUFFERING = False
> I had similar trouble setting this up last time and ended up leaving the
> configuration to a sysadmin. It would be really good to be able to solve
> this by myself this time around. I had odbc access to postgresql last week
> before a forced reinstall. How I miss it now!
>
> Apologies for my ignorance but rest assured that learning is taking place.
> Cheers,
I am curious why you are using ODBC to connect to PostgreSQL if you are
on Dapper? Are you using Open Office or somethign like that?
Sincerely,
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: jd@commandprompt.com, ricardd@mathstat.dal.ca, unixodbc-support@easysoft.com
Subject: Re: UNRESOLVED: odbc driver manager and postgresql odbc driver
In-Reply-To: <4490752E.5060302@commandprompt.com>
References: <60652.24.222.143.8.1150313824.squirrel@24.222.143.8> <4490752E.5060302@commandprompt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox