File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.167 2005/04/29 13:42:21 momjian Exp $
11
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.168 2005/06/09 20:01:16 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
30
30
#endif
31
31
32
32
/* keep this in same order as ExecStatusType in libpq-fe.h */
33
- char * const pgresStatus [] = {
33
+ char * const pgresStatus [] = {
34
34
"PGRES_EMPTY_QUERY" ,
35
35
"PGRES_COMMAND_OK" ,
36
36
"PGRES_TUPLES_OK" ,
@@ -960,7 +960,14 @@ PQsendQueryGuts(PGconn *conn,
960
960
if (paramFormats && paramFormats [i ] != 0 )
961
961
{
962
962
/* binary parameter */
963
- nbytes = paramLengths [i ];
963
+ if (paramLengths )
964
+ nbytes = paramLengths [i ];
965
+ else
966
+ {
967
+ printfPQExpBuffer (& conn -> errorMessage ,
968
+ libpq_gettext ("length must be given for binary parameter\n" ));
969
+ goto sendFailed ;
970
+ }
964
971
}
965
972
else
966
973
{
Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.116 2004/12/31 22:03:50 pgsql Exp $
10
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.117 2005/06/09 20:01:16 tgl Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -156,7 +156,7 @@ typedef struct _PQprintOpt
156
156
char * fieldSep ; /* field separator */
157
157
char * tableOpt ; /* insert to HTML <table ...> */
158
158
char * caption ; /* HTML <caption> */
159
- char * * fieldName ; /* null terminated array of repalcement
159
+ char * * fieldName ; /* null terminated array of replacement
160
160
* field names */
161
161
} PQprintOpt ;
162
162
You can’t perform that action at this time.
0 commit comments