From: Andro <andromede@gmail.com>
To: pgsql-interfaces@postgresql.org
Subject: leaving out paramTypes parameter
Date: Mon, 14 Aug 2006 15:38:23 +0200
Message-ID: <da7021e0608140638w4bc5a22ey4d358d649442c8f5@mail.gmail.com> (raw)
Hi,
from the documentation, here's PQexecParams prototype
PGresult *PQexecParams(PGconn *conn,
const char *command,
int nParams,
const Oid *paramTypes,
const char * const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
and PQprepare's
PGresult *PQprepare(PGconn *conn,
const char *stmtName,
const char *query,
int nParams,
const Oid *paramTypes);
they both require "paramTypes" parameter, but documentation says "If
paramTypes is NULL, or any particular element in the array is zero,
the server assigns a data type to the parameter symbol in the same way
it would do for an untyped literal string."
How reliable is that? Can we really leave out this parameter anytime?
What are known issues? Or should we try at all costs to specify
parameters type?
Thanks
Charles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: andromede@gmail.com
Subject: Re: leaving out paramTypes parameter
In-Reply-To: <da7021e0608140638w4bc5a22ey4d358d649442c8f5@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox