/* * call-seq: * conn.endcopy() * * Waits until the backend completes the copying. * You should call this method after #putline or #getline. * Returns +nil+ on success; raises an exception otherwise. */ static VALUE pgconn_endcopy(obj) VALUE obj; { if (PQendcopy(get_pgconn(obj)) == 1) { rb_raise(rb_ePGError, "cannot complete copying"); } return Qnil; }