*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.167 2005/04/29 13:42:21 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.168 2005/06/09 20:01:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#endif
/* keep this in same order as ExecStatusType in libpq-fe.h */
-char *const pgresStatus[] = {
+char *const pgresStatus[] = {
"PGRES_EMPTY_QUERY",
"PGRES_COMMAND_OK",
"PGRES_TUPLES_OK",
if (paramFormats && paramFormats[i] != 0)
{
/* binary parameter */
- nbytes = paramLengths[i];
+ if (paramLengths)
+ nbytes = paramLengths[i];
+ else
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("length must be given for binary parameter\n"));
+ goto sendFailed;
+ }
}
else
{
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.116 2004/12/31 22:03:50 pgsql Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.117 2005/06/09 20:01:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
char *fieldSep; /* field separator */
char *tableOpt; /* insert to HTML <table ...> */
char *caption; /* HTML <caption> */
- char **fieldName; /* null terminated array of repalcement
+ char **fieldName; /* null terminated array of replacement
* field names */
} PQprintOpt;