/*
 * call-seq:
 *    res.cmdtuples()
 *
 * Returns the number of tuples (rows) affected by the SQL command.
 *
 * If the SQL command that generated the PGresult was not one of +INSERT+, +UPDATE+, +DELETE+, +MOVE+, or +FETCH+, or if no tuples (rows) were affected, +0+ is returned.
 */
static VALUE
pgresult_cmdtuples(obj)
    VALUE obj;
{
  long n;
  n = strtol(PQcmdTuples(get_pgresult(obj)),NULL, 10);
  return INT2NUM(n);
}