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

What is the minimal ODBC ini entry?

From: "Rich Silva" <rich(dot)silva(at)softwareprose(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: What is the minimal ODBC ini entry?
Date: 2004-10-20 18:53:37
Message-ID: 20041020185354.IBZZ10009.lakecmmtao03.coxmail.com@CALICOBASS (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-odbc
As I've been playing with differing versions of psqlodbc I've been editing
odbc.ini with "abandon"... But now I'd like to understand a little better...
I've yet to find a document that explains what each term implies, but have
found a number of examples.

What I'll do here is to include a portion of my odbcinst and odbc.ini files
and add "comments" with my questions.

; ### sample odbcinst.ini ###
[PostgreSQL]
Description     = ODBC for PostgreSQL
Driver          = /usr/lib/psqlodbc.so
Setup           = /usr/lib/libodbcpsqlS.so
;
; I notice that the psqlodbc source tree does not build a Setup
; library. If that is the case, what is the right entry for it?
;
FileUsage       = 1
CPTimeout       =
CPReuse         =

[ODBC]
Trace           = Yes
TraceFile       = /tmp/ODBCsql.log
ForceTrace      = Yes
Pooling         = No
;
; Does this stanza have any relationship to the same one in /etc/odbc.ini?
;

; ### sample odbc.ini ###
[ODBC Data Sources]
Mustang = PostgreSQL Database from unixODBC
Mustang_07.03.0200_02.50 = PostgreSQL using 07.03.0200_02.50
Mustang_07.03.0200_03.00 = PostgreSQL using 07.03.0200_03.00
Mustang_07.05.0001_03.00 = PostgreSQL using 07.05.0001_03.00
Mustang_08.00.0001_03.00 = PostgreSQL using 08.00.0001_03.00
Mustang_08.00.0002_03.00 = PostgreSQL using 08.00.0002_03.00
;
; Are their any restrictions on characters in a DSN name?
; From other experiments, I found that the <tab> char is
; not <whitespace> in this stanza. Are their other restrictions?
;

[DEFAULT]
;
; I've seen both [Default] and [DEFAULT] in samples, is there
; a correct one? There is no reference to "default" as a string
; in the source.
;
; When I tried to actually use this as a default (setting common
; options here and just setting DSN specific settings elsewhere
; I saw errors about certain values not being set and no default
; being set.
;
; Also, does this "default DSN" need to be named in the
; [ODBC Data Sources] section?
;
Driver          = /usr/lib/libodbcpsql.so
Trace           = Yes
TraceFile       = /tmp/trace_psqlodbc.log
;
; Is this attribute overridden somewhere? I have never seen one
; of these trace files on my system. Although I have seen files
; with names of the form:
;	/tmp/mylog_<uid><pid>.log    /tmp/psqlodbc_<uid><pid>.log
;
Servername      = localhost
Username        = postgres
Password        = swp123
Port            = 5432
Protocol        = 6.4
;
; What does this version imply? I have seen both 6.4 and 7.0 in
; sample files on the net. This line was produced by ODBCConfig
; but I have no idea whether it pulled it out of a specific
; psql driver or not. The 07.05.0001 source suggests version 6.4
; is the default. The source references up to version 7.3.
; What do I check in either my data manager (unixODBC) or Postgres
; backend (7.4.5-2) to find what the correct setting should be?
;
ReadOnly        = No
RowVersioning   = No
ShowSystemTables        = No
ShowOidColumn   = No
FakeOidIndex    = No
ConnSettings    =
Debug           = 1
CommLog         = 1

[Mustang]
Description     = Mustang using default driver
Driver          = /usr/lib/libodbcpsql.so
Database        = Mustang
TraceFile       = /tmp/trace_odbc_libodbcpsql.log
Database        = Mustang
Trace           = Yes
Servername      = localhost
Username        = postgres
Password        = swp123
Port            = 5432
Protocol        = 6.4
ReadOnly        = No
RowVersioning   = No
ShowSystemTables        = No
ShowOidColumn   = No
FakeOidIndex    = No
ConnSettings    =
Debug           = 1
CommLog         = 1
; <others omitted for "brevity"

[ODBC]
InstallDir	= ???
;
; I've seen in some documents that this entry is required
; but it does not exist in the sample sent out with various
; Linux RPMs.
;
; Is it required? And what should it be set to? In a sample
; I have it references a shared library (the entry is /usr/lib/libiodbc.so)
; If I am using unixODBC, what should it be set to?
;

I hope this wasn't too long...
Thanx for the help...
Rich




In response to

pgsql-odbc by date

Next:From: Rich SilvaDate: 2004-10-20 19:06:56
Subject: Re: Errors compiling psqlodbc
Previous:From: Roderick A. AndersonDate: 2004-10-20 18:52:03
Subject: Re: Upgrade to Win XP Service Pak 2 SP2 causes connection

pgsql-general by date

Next:From: Eric EDate: 2004-10-20 18:59:27
Subject: Re: Sequence question
Previous:From: Roderick A. AndersonDate: 2004-10-20 18:52:03
Subject: Re: Upgrade to Win XP Service Pak 2 SP2 causes connection

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