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

Re: Patch for ODBC driver (look for odbc.ini in more than

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Ross Thomas" <ross(at)grinfinity(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for ODBC driver (look for odbc.ini in more than
Date: 2001-12-30 22:25:49
Message-ID: EKEJJICOHDIEMGPNIFIJCEDAGFAA.Inoue@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-patches
> -----Original Message-----
> From: Bruce Momjian
>
> It looks like we already have this capability in 7.2:
>
> /*
>  * theIniFileName is searched for in:
>  *  $HOME/theIniFileName
>  *  theIniFileName
>  *  ODBCINSTDIR/ODBCINST_INI
>  */
> DWORD
> GetPrivateProfileString(const char *theSection, /* section name */
>                         const char *theKey,     /* search key name */
>                         const char *theDefault, /* default value if not
>                                                  * found */
>                         char *theReturnBuffer,  /* return value stored
>                                                  * here */
>                         size_t theReturnBufferLength,   /* byte
> length of return
>                                                          * buffer */
>                         const char *theIniFileName)     /*
> pathname of ini file
>                                                          * to search */
>
> ------------------------------------------------------------------
> ---------
>
> > Since most ODBC drivers and driver managers look for odbc.ini in several
> > locations on UNIX systems, it would seem sensible to have the PostgreSQL
> > driver do the same thing. (This idea occurred to me after five hours of
> > trying to figure out what libpsqlodbc didn't like about my
> /etc/odbc.ini,
> > but that's another story.)
> >
> > iODBC, for example, does the following:
> >
> > 1) Checks $ODBCINI
> > 2) Checks $HOME/.odbc.ini
> > 3) Checks ~/.odbc.ini (where ~ is obtained from struct passwd)
> > 4) Checks system-wide odbc.ini (in /etc by default)

AFAIK only 3) is implemented. However there's no problem
if there's no user.

regards,
Hiroshi Inoue


In response to

Responses

pgsql-patches by date

Next:From: Ross ThomasDate: 2001-12-31 02:05:44
Subject: Re: Patch for ODBC driver (look for odbc.ini in more than
Previous:From: Bruce MomjianDate: 2001-12-29 18:07:52
Subject: Re: Patch for ODBC driver (look for odbc.ini in more than

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