select_value (PGconn)

    /*
     * call-seq:
     *   conn.select_value(query, *bind_values)
     *
     * Return the first value of the first row of the query results.
     * Equivalent to conn.query(query, *bind_values).first.first
     */
    static VALUE
    pgconn_select_value(argc, argv, self)
        int argc;
        VALUE *argv;
        VALUE self;
    {
        VALUE result = pgconn_exec(argc, argv, self);
        VALUE value = fetch_pgresult(get_pgresult(result), 0, 0);
        pgresult_clear(result);
        return value;
    }