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

Re: ODBC driver

From: mlw <markw(at)mohawksoft(dot)com>
To: Annissa Melhenas <melhenas(at)cogenit(dot)fr>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: ODBC driver
Date: 2002-07-03 17:29:26
Message-ID: (view raw or whole thread)
Lists: pgsql-odbc
First, don't use template1, create a new database for what you want to do. Try
"createdb ldap"

Second, make sure you "createuser" for the username under which you will be
connecting to the database, use your name for now.

in odbcinst.ini (likely in /etc or /usr/local/etc depending on how you
installed it.), describe the PostgreSQL driver, as:

Description             = PostgreSQL ODBC Driver by unixODBC
Driver          = /usr/local/lib/
Setup           = /usr/local/lib/

(substitute your path for what I used.)

Now, in your .odbc.ini file in your home directory,

Description             = PostgreSQL
Driver          = PostgreSQL
Trace           = No
TraceFile               =
Database                = ldap
Servername              = localhost
UserName                = annissa
Password                =
Port            = 5432
Protocol                = 6.4
ReadOnly                = No
RowVersioning           = No
ShowSystemTables                = No
ShowOidColumn           = No
FakeOidIndex            = No
ConnSettings            =

You should then be able to connect, with the assumptions:
Your user name is "annissa."
The PG server is localhost.

Annissa Melhenas wrote:
>                         Hi all,
> I installed openldap, postgres, and I wanted to link the two of them. So I re-confiured both using the with-odbc option. then, I installed the ODBC package, firs the source, then as some things went wrong, i thought I had done something wrong with installation, so I re-installed everything, with RPMs.
> filled my odbc.ini file :
> ;
> ; odbc.ini
> ;
> [ODBC Data Sources]
> test=template1
> [test]
> Driver=/usr/lib/
> Description=Sample PostgreSQL DSN
> DSN=template1
> Servername=
> username=postgresql
> password=secret
> Database=PostgreSQL
> Readonly=No
> ;Servertype=postgres
> Port=5432
> FetchBufferSize=99
> ;ServerOptions=
> ;ConnectOptions=
> ;Options=
> ;Readonly=no
> ;Trace=1
> [Default]
> Driver=/usr/lib/
> [ODBC]
> InstallDir= /usr/lib/
> and I checked the and existed, and were in the good path.
> When I first launched an ldconfig after my installation, I had a error message
> saying there one of the libpsqlodbc lib, (I had three :
>,, and, was not a symbolic
> link. so, I turned and into symbolic links to now point to
> After all that, I launched an odbctest, but, when I do that, I have no DSN available in the array, though I added one in the odbc.ini..
> Is there something I forgot to do?
> Thanks for your help,
> --
> Annissa,
> The computer slayer
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

  • ODBC driver at 2002-07-03 15:28:00 from Annissa Melhenas


pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2002-07-04 03:03:45
Subject: Re: ODBC driver
Previous:From: Annissa MelhenasDate: 2002-07-03 15:28:00
Subject: ODBC driver

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