Skip site navigation (1) Skip section navigation (2)

Re: UNRESOLVED: odbc driver manager and postgresql odbc driver

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: ricardd(at)mathstat(dot)dal(dot)ca
Cc: unixodbc-support(at)easysoft(dot)com, pgsql-odbc(at)postgresql(dot)org
Subject: Re: UNRESOLVED: odbc driver manager and postgresql odbc driver
Date: 2006-06-14 20:44:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
> 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
> (
> I'm stuck.

odbc-postgresql is the driver
unixODBC is the driver manager.


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:


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            =


Description     = PostgreSQL ODBC driver
Driver          = /usr/lib/odbc/
Setup           = /usr/lib/odbc/
Debug           = 0
CommLog         = 1
UsageCount      = 2

Description     = PostgreSQL ODBC driver
Driver          = /usr/local/lib/
Debug           = 0
CommLog         = 1
UsageCount      = 2

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


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

In response to


pgsql-odbc by date

Next:From: ricarddDate: 2006-06-14 20:55:31
Subject: Re: UNRESOLVED: odbc driver manager and postgresql odbc
Previous:From: ricarddDate: 2006-06-14 19:37:04
Subject: UNRESOLVED: odbc driver manager and postgresql odbc driver in Ubuntu

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group