Thread: ODBC changes
Hi all, I've committed the following changes. psqlodbc driver is now 7.01.0009. 1) Add md5 authentication support thanks to Bruce Momjian. 2) Use abbreviated connection strings more widely. It seems to fix the trouble with PowerBuilder. 3) Fix a few(not all) bugs about SQLetData() reported by Mika Mantyla. 4) Fix an option dialog setting bug. 5) Improve the handling of literals in parse_statement(). 6) Improve the internal timestamp scale handling. regards, Hiroshi Inoue
> -----Original Message----- > From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] > Sent: 27 November 2001 01:53 > To: pgsql-odbc@postgresql.org > Subject: [ODBC] ODBC changes > > > Hi all, > > I've committed the following changes. > psqlodbc driver is now 7.01.0009. > > 1) Add md5 authentication support thanks to Bruce Momjian. > 2) Use abbreviated connection strings more widely. It seems > to fix the trouble with PowerBuilder. > 3) Fix a few(not all) bugs about SQLetData() reported by > Mika Mantyla. > 4) Fix an option dialog setting bug. > 5) Improve the handling of literals in parse_statement(). > 6) Improve the internal timestamp scale handling. > Hiroshi, I just tried to build this for distribution - any idea what I'm missing - presumably I need to add a reference to an MD5 library (if there is one in VC++)? Cheers, Dave. Deleting intermediate files and output files for project 'psqlodbc - Win32 Release'. --------------------Configuration: psqlodbc - Win32 Release-------------------- Compiling resources... Compiling... bind.c columninfo.c connection.c convert.c dlg_specific.c drvconn.c C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\drvconn.c(328) : warning C4028: formal parameter 2 different from declaration C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\drvconn.c(328) : warning C4024: 'DialogBoxParamA' : different types for formal and actual parameter 4 C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\drvconn.c(334) : warning C4028: formal parameter 2 different from declaration C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\drvconn.c(334) : warning C4024: 'DialogBoxParamA' : different types for formal and actual parameter 4 environ.c execute.c gpps.c info.c lobj.c misc.c multibyte.c odbcapi.c odbcapi30.c options.c parse.c pgtypes.c psqlodbc.c qresult.c results.c setup.c C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\setup.c(134) : warning C4028: formal parameter 2 different from declaration C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\setup.c(134) : warning C4024: 'DialogBoxParamA' : different types for formal and actual parameter 4 C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\setup.c(306) : warning C4028: formal parameter 2 different from declaration C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\setup.c(306) : warning C4024: 'DialogBoxParamA' : different types for formal and actual parameter 4 C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\setup.c(313) : warning C4028: formal parameter 2 different from declaration C:\Documents and Settings\dpage\My Documents\CVS\pgsql\src\interfaces\odbc\setup.c(313) : warning C4024: 'DialogBoxParamA' : different types for formal and actual parameter 4 socket.c statement.c tuple.c tuplelist.c Linking... Creating library Release/psqlodbc.lib and object Release/psqlodbc.exp connection.obj : error LNK2001: unresolved external symbol _EncryptMD5 Release/psqlodbc.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. psqlodbc.dll - 2 error(s), 10 warning(s)
Dave Page wrote: > > > -----Original Message----- > > From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] > > Sent: 27 November 2001 01:53 > > To: pgsql-odbc@postgresql.org > > Subject: [ODBC] ODBC changes > > > > > > Hi all, > > > > I've committed the following changes. > > psqlodbc driver is now 7.01.0009. > > > > 1) Add md5 authentication support thanks to Bruce Momjian. > > 2) Use abbreviated connection strings more widely. It seems > > to fix the trouble with PowerBuilder. > > 3) Fix a few(not all) bugs about SQLetData() reported by > > Mika Mantyla. > > 4) Fix an option dialog setting bug. > > 5) Improve the handling of literals in parse_statement(). > > 6) Improve the internal timestamp scale handling. > > > > Hiroshi, > > I just tried to build this for distribution - any idea what I'm missing - > presumably I need to add a reference to an MD5 library (if there is one in > VC++)? I added win_md5.c to interfaces/odbc. Does win32.mak contain win_md5.obj ? regards, Hiroshi Inoue
> I just tried to build this for distribution - any idea what I'm missing - > presumably I need to add a reference to an MD5 library (if there is one in > VC++)? This is bad. There should be an md5.c reference in whatever build file you are using. If it isn't there, it is a bug. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Dave Page wrote: > > > -----Original Message----- > > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > > Sent: 27 November 2001 08:45 > > To: Dave Page > > Cc: 'Hiroshi Inoue'; pgsql-odbc@postgresql.org > > Subject: Re: [ODBC] ODBC changes > > > > > > > I just tried to build this for distribution - any idea what I'm > > > missing - presumably I need to add a reference to an MD5 > > library (if > > > there is one in > > > VC++)? > > > > This is bad. There should be an md5.c reference in whatever > > build file you are using. If it isn't there, it is a bug. > > Sorry Bruce (& Hiroshi). I build the distributions using the VC++ IDE, not > the makefile - I didn't notice the addition of md5.c. > > On that note, isn't the fact that md5.h is only included if MD5_ODBC is > defined a bug seeing as md5.h is *where* it's defined? (if you see what I > mean!). I got it to compile by defining MD5_ODBC in the project settings but > that does add a couple of ugly warnings about macro redefinitions. Please use win_md5.c(obj) instead of md5.c(obj). It contains needed #define-s to compile md5.c for psqlodbc. regards, Hiroshi Inoue
> -----Original Message----- > From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] > Sent: 27 November 2001 08:47 > To: Dave Page > Cc: pgsql-odbc@postgresql.org > Subject: Re: [ODBC] ODBC changes > > > Hiroshi, > > > > I just tried to build this for distribution - any idea what I'm > > missing - presumably I need to add a reference to an MD5 > library (if > > there is one in > > VC++)? > > I added win_md5.c to interfaces/odbc. > Does win32.mak contain win_md5.obj ? > Yup, got it. The makefile *looks* OK as well. I'll add a note to the website about not including md5.c when building on Win32. Regards, Dave.
> -----Original Message----- > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > Sent: 27 November 2001 08:45 > To: Dave Page > Cc: 'Hiroshi Inoue'; pgsql-odbc@postgresql.org > Subject: Re: [ODBC] ODBC changes > > > > I just tried to build this for distribution - any idea what I'm > > missing - presumably I need to add a reference to an MD5 > library (if > > there is one in > > VC++)? > > This is bad. There should be an md5.c reference in whatever > build file you are using. If it isn't there, it is a bug. Sorry Bruce (& Hiroshi). I build the distributions using the VC++ IDE, not the makefile - I didn't notice the addition of md5.c. On that note, isn't the fact that md5.h is only included if MD5_ODBC is defined a bug seeing as md5.h is *where* it's defined? (if you see what I mean!). I got it to compile by defining MD5_ODBC in the project settings but that does add a couple of ugly warnings about macro redefinitions. Regards, Dave.
> > This is bad. There should be an md5.c reference in whatever > > build file you are using. If it isn't there, it is a bug. > > Sorry Bruce (& Hiroshi). I build the distributions using the VC++ IDE, not > the makefile - I didn't notice the addition of md5.c. > > On that note, isn't the fact that md5.h is only included if MD5_ODBC is > defined a bug seeing as md5.h is *where* it's defined? (if you see what I > mean!). I got it to compile by defining MD5_ODBC in the project settings but > that does add a couple of ugly warnings about macro redefinitions. I believe you are commenting about this in md5.h: #ifdef WIN32 #define MD5_ODBC #define FRONTEND #endif Yes, not sure this makes sense anymore because Hiroshi added win_md5.c which defines those and then includes md5.c. Hiroshi, should this part be removed? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian wrote: > > > > This is bad. There should be an md5.c reference in whatever > > > build file you are using. If it isn't there, it is a bug. > > > > Sorry Bruce (& Hiroshi). I build the distributions using the VC++ IDE, not > > the makefile - I didn't notice the addition of md5.c. > > > > On that note, isn't the fact that md5.h is only included if MD5_ODBC is > > defined a bug seeing as md5.h is *where* it's defined? (if you see what I > > mean!). I got it to compile by defining MD5_ODBC in the project settings but > > that does add a couple of ugly warnings about macro redefinitions. > > I believe you are commenting about this in md5.h: > > #ifdef WIN32 > #define MD5_ODBC > #define FRONTEND > #endif > > Yes, not sure this makes sense anymore because Hiroshi added win_md5.c > which defines those and then includes md5.c. Hiroshi, should this part > be removed? #define MD5_ODBC in md5.h is useless from the first because md5.h isn't #included unless MD5_ODBC is #defined. I don't know about FRONTEND. Usually I don't use win32.mak to compile the driver. It seems Dave doesn't use it either. The extra two -D(/D) compile options seem too heavy only for md5.c, so I added win_md5.c to avoid my mistake. Note that md5.c is used directly under *nixes. regards, Hiroshi Inoue
> > I believe you are commenting about this in md5.h: > > > > #ifdef WIN32 > > #define MD5_ODBC > > #define FRONTEND > > #endif > > > > Yes, not sure this makes sense anymore because Hiroshi added win_md5.c > > which defines those and then includes md5.c. Hiroshi, should this part > > be removed? > > #define MD5_ODBC in md5.h is useless from the first > because md5.h isn't #included unless MD5_ODBC is #defined. > I don't know about FRONTEND. Usually I don't use win32.mak > to compile the driver. It seems Dave doesn't use it either. > The extra two -D(/D) compile options seem too heavy only > for md5.c, so I added win_md5.c to avoid my mistake. Note > that md5.c is used directly under *nixes. OK, I am applying the following patch. Instead of using -D in each compile script, Hiroshi has used win_md5.c to define what he needs and then include md5.c. With this method, the test in md5.h is no longer needed. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: src/interfaces/odbc/md5.h =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/odbc/md5.h,v retrieving revision 1.6 diff -c -r1.6 md5.h *** src/interfaces/odbc/md5.h 2001/11/19 06:26:00 1.6 --- src/interfaces/odbc/md5.h 2001/11/28 00:13:40 *************** *** 14,23 **** #include <stdlib.h> #include <string.h> - #ifdef WIN32 - #define MD5_ODBC - #define FRONTEND - #endif #define MD5_PASSWD_LEN 35 /* From c.h */ --- 14,19 ----