Problem with SQLGetTypeInfo

From: Zhou Han <zh_ok(at)163(dot)net>
To: pgsql-odbc(at)postgresql(dot)org <pgsql-odbc(at)postgresql(dot)org>
Subject: Problem with SQLGetTypeInfo
Date: 2002-07-04 14:12:09
Message-ID: 20020704140847.653CA1D48BF6B@bjapp14.163.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

There's a missmatch in the following functions:
Int4
PGtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as)
{
switch (type)
{
case PG_TYPE_CHAR:
return 1;
...
}
char *
pgtype_create_params(StatementClass *stmt, Int4 type)
{
switch (type)
{
case PG_TYPE_CHAR:
case PG_TYPE_VARCHAR:return "max. length";
default:
return NULL;
}
}

"case PG_TYPE_CHAR" should be changed to "case PG_TYPE_BPCHAR", or there will be a error when use SQLGetTypeInfo. Because the precision of PG_TYPE_CHAR is 1, it should return NULL in function "pgtype_create_params" instead of "max. length"!!!
What do you think?

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Zhou Han 2002-07-04 14:16:47 About ODBC3
Previous Message Zhou Han 2002-07-04 13:19:26 About ODBC3