2) Introcuced 3 drivers.
3) The version is now 7.02.0001.
static Int2
getNumericDecimalDigits(StatementClass *stmt, Int4 type, int col)
{
- Int4 atttypmod = -1;
+ Int4 atttypmod = -1, default_decimal_digits = 6;
QResultClass *result;
ColumnInfoClass *flds;
return flds->adtsize[col];
}
if (atttypmod < 0)
- return PG_NUMERIC_MAX_SCALE;
+ return default_decimal_digits;
}
else
atttypmod = QR_get_atttypmod(result, col);
if (atttypmod > -1)
return (atttypmod & 0xffff);
else
- return (QR_get_display_size(result, col) ?
- QR_get_display_size(result, col) :
- PG_NUMERIC_MAX_SCALE);
+ {
+ Int4 dsp_size = QR_get_display_size(result, col);
+ if (dsp_size <= 0)
+ return default_decimal_digits;
+ if (dsp_size < 5)
+ dsp_size = 5;
+ return dsp_size;
+ }
}
static Int4
getNumericColumnSize(StatementClass *stmt, Int4 type, int col)
{
- Int4 atttypmod = -1;
+ Int4 atttypmod = -1, max_column_size = PG_NUMERIC_MAX_PRECISION + PG_NUMERIC_MAX_SCALE, default_column_size = 28;
QResultClass *result;
ColumnInfoClass *flds;
mylog("getNumericColumnSize: type=%d, col=%d\n", type, col);
if (col < 0)
- return PG_NUMERIC_MAX_PRECISION;
+ return max_column_size;
result = SC_get_Curres(stmt);
{
atttypmod = flds->atttypmod[col];
if (atttypmod < 0 && flds->adtsize[col] > 0)
- return flds->adtsize[col];
+ return 2 * flds->adtsize[col];
}
if (atttypmod < 0)
- return PG_NUMERIC_MAX_PRECISION;
+ return default_column_size;
}
else
atttypmod = QR_get_atttypmod(result, col);
if (atttypmod > -1)
return (atttypmod >> 16) & 0xffff;
else
- return (QR_get_display_size(result, col) > 0 ?
- QR_get_display_size(result, col) :
- PG_NUMERIC_MAX_PRECISION);
+ {
+ Int4 dsp_size = QR_get_display_size(result, col);
+ if (dsp_size <= 0)
+ return default_column_size;
+ dsp_size *= 2;
+ if (dsp_size < 10)
+ dsp_size = 10;
+ return dsp_size;
+ }
}
p = QR_get_display_size(result, col); /* longest */
attlen = QR_get_atttypmod(result, col);
/* Size is unknown -- handle according to parameter */
- if (attlen > p) /* maybe the length is known */
+ if (attlen >= p && attlen > 0) /* maybe the length is known */
return attlen;
/* The type is really unknown */
*
* Comments: See "notice.txt" for copyright and license information.
*
- * $Id: psqlodbc.h,v 1.64 2002/04/10 08:18:53 inoue Exp $
+ * $Id: psqlodbc.h,v 1.65 2002/04/15 02:46:00 inoue Exp $
*
*/
#define DBMS_NAME "PostgreSQL"
#endif /* ODBCVER */
-#define POSTGRESDRIVERVERSION "07.01.0011"
+#define POSTGRESDRIVERVERSION "07.02.0001"
#ifdef WIN32
#if (ODBCVER >= 0x0300)
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 7,1,0,11
- PRODUCTVERSION 7,1,0,11
+ FILEVERSION 7,2,0,01
+ PRODUCTVERSION 7,2,0,01
FILEFLAGSMASK 0x3L
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "CompanyName", "Insight Distribution Systems\0"
#endif
VALUE "FileDescription", "PostgreSQL Driver\0"
- VALUE "FileVersion", " 07.01.0011\0"
+ VALUE "FileVersion", " 07.02.0001\0"
VALUE "InternalName", "psqlodbc\0"
VALUE "LegalCopyright", "\0"
VALUE "LegalTrademarks", "ODBC(TM) is a trademark of Microsoft Corporation. Microsoft® is a registered trademark of Microsoft Corporation. Windows(TM) is a trademark of Microsoft Corporation.\0"
VALUE "OriginalFilename", "psqlodbc.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Microsoft Open Database Connectivity\0"
- VALUE "ProductVersion", " 07.01.0011\0"
+ VALUE "ProductVersion", " 07.02.0001\0"
VALUE "SpecialBuild", "\0"
END
END
"Setup"="PSQLODBC.DLL"\r
"SQLLevel"="1"\r
"UsageCount"=dword:00000001\r
-\r
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI]\r
\r
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]\r
-"PostgreSQL30"="Installed"\r
+"PostgreSQL+ (Beta)"="Installed"\r
\r
-[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL30]\r
+[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL+ (Beta)]\r
"APILevel"="1"\r
"ConnectFunctions"="YYN"\r
"Driver"="PSQLODBC30.DLL"\r
"Setup"="PSQLODBC30.DLL"\r
"SQLLevel"="1"\r
"UsageCount"=dword:00000001\r
-\r
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI]\r
\r
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]\r
-"PostgreSQL30W"="Installed"\r
+"PostgreSQL+ Unicode (Beta)"="Installed"\r
\r
-[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL30W]\r
+[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL+ Unicode (Beta)]\r
"APILevel"="1"\r
"ConnectFunctions"="YYN"\r
"Driver"="PSQLODBC30W.DLL"\r