Commit c2f5d08c authored by Hiroshi Inoue's avatar Hiroshi Inoue

Fix a lot of compile errors on unix.

Fix '\\' handling for bytea type.
parent 18529514
......@@ -2,7 +2,7 @@
#
# GNUMakefile for psqlodbc (Postgres ODBC driver)
#
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.16 2001/05/11 01:46:33 momjian Exp $
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.17 2001/08/21 05:21:09 inoue Exp $
#
#-------------------------------------------------------------------------
......@@ -21,7 +21,7 @@ override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(o
OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
environ.o execute.o lobj.o misc.o options.o \
pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
gpps.o tuple.o tuplelist.o dlg_specific.o odbcapi.o $(OBJX)
ifdef MULTIBYTE
OBJS += multibyte.o
......
......@@ -1969,8 +1969,16 @@ convert_from_pgbinary(unsigned char *value, unsigned char *rgbValue, int cbValue
{
if (value[i] == '\\')
{
rgbValue[o] = conv_from_octal(&value[i]);
i += 4;
if (value[i + 1] == '\\')
{
rgbValue[o] = value[i];
i += 2;
}
else
{
rgbValue[o] = conv_from_octal(&value[i]);
i += 4;
}
}
else
rgbValue[o] = value[i++];
......
......@@ -682,7 +682,6 @@ PGAPI_GetInfo(
break;
default:
return PGAPI_GetInfo30(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax,pcbInfoValue);
/* unrecognized key */
conn->errormsg = "Unrecognized key passed to PGAPI_GetInfo.";
conn->errornumber = CONN_NOT_IMPLEMENTED_ERROR;
......
......@@ -26,7 +26,7 @@ typedef signed short RETCODE;
#define SQL_API EXPORT CALLBACK
#endif
#define ODBCVER 0x0250
/*#define ODBCVER 0x0250 */
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_DSN_LENGTH 32
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -697,6 +697,9 @@ pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_
return 16;
/* Character types (and NUMERIC) use the default precision */
case PG_TYPE_VARCHAR:
case PG_TYPE_BPCHAR:
return 2 * pgtype_precision(stmt, type, col, handle_unknown_size_as);
default:
return pgtype_precision(stmt, type, col, handle_unknown_size_as);
}
......
......@@ -714,13 +714,15 @@ SC_fetch(StatementClass *self)
static char *func = "SC_fetch";
QResultClass *res = self->result;
int retval,
result, updret;
result;
#ifdef DRIVER_CURSOR_IMPLEMENT
int updret;
#endif /* DRIVER_CURSOR_IMPLEMENT */
Int2 num_cols,
lf;
Oid type;
char *value;
ColumnInfoClass *ci;
extern WORD addrow;
/* TupleField *tupleField; */
self->last_fetch_count = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment