/* * call-seq: * conn.describe_prepared( statement_name ) -> PGresult * * Retrieve information about the prepared statement * _statement_name_. */ static VALUE pgconn_describe_prepared(VALUE self, VALUE stmt_name) { PGresult *result; VALUE rb_pgresult; PGconn *conn = get_pgconn(self); char *stmt; if(stmt_name == Qnil) { stmt = NULL; } else { Check_Type(stmt_name, T_STRING); stmt = StringValuePtr(stmt_name); } result = PQdescribePrepared(conn, stmt); rb_pgresult = new_pgresult(result, conn); pgresult_check(self, rb_pgresult); return rb_pgresult; }