Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 6123)
+++ wp-includes/post.php	(working copy)
@@ -190,6 +190,18 @@
 	return false;
 }
 
+function set_post_type( $post_id = 0, $post_type = 'post' ) {
+	global $wpdb;
+	$post_type = sanitize_post_field('post_type', $post_type, $post_id, 'db');
+	$return = $wpdb->query( "UPDATE $wpdb->posts SET post_type = '$post_type' WHERE ID = '$post_id'" );
+	if ( 'page' == $post_type ) {
+		clean_page_cache($post_id);
+	} else {
+		clean_post_cache($post_id);
+	}
+	return $return;
+}
+
 function get_posts($args) {
 	global $wpdb;
 

