if (!PQsendQueryStart(conn))
return 0;
+ /* check the argument */
if (!query)
{
printfPQExpBuffer(&conn->errorMessage,
if (!PQsendQueryStart(conn))
return 0;
+ /* check the arguments */
if (!command)
{
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("command string is a null pointer\n"));
return 0;
}
+ if (nParams < 0 || nParams > 65535)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ return 0;
+ }
return PQsendQueryGuts(conn,
command,
if (!PQsendQueryStart(conn))
return 0;
+ /* check the arguments */
if (!stmtName)
{
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("statement name is a null pointer\n"));
return 0;
}
-
if (!query)
{
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("command string is a null pointer\n"));
return 0;
}
+ if (nParams < 0 || nParams > 65535)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ return 0;
+ }
/* This isn't gonna work on a 2.0 server */
if (PG_PROTOCOL_MAJOR(conn->pversion) < 3)
if (!PQsendQueryStart(conn))
return 0;
+ /* check the arguments */
if (!stmtName)
{
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("statement name is a null pointer\n"));
return 0;
}
+ if (nParams < 0 || nParams > 65535)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ return 0;
+ }
return PQsendQueryGuts(conn,
NULL, /* no command to parse */