How do you define an arbitrary sort sequence for views?
Views has hook_views_query_alter, which lets you mess with the query object that it maintains.  It gets called before the query object gets converted to SQL.  You can change the sorting that is set in the UI with something like:

function mymodule_views_query_alter (&amp;$view, &amp;$query)
{
  $query-&gt;orderby = array('node.nid ASC');
}


Basically, the value you use is what would be after the ORDER BY in a normal query.  You should be able to use an ORDER BY CASE, 

function mymodule_views_query_alter (&amp;$view, &amp;$query)
{
  $orderby = "
    CASE
      WHEN node.type = 'page' THEN 1
      WHEN node.type = 'article' THEN 2
    END ASC
  ";
  $query-&gt;orderby = array($orderby);
}


You will need to enable previewing the SQL in Views (it's in the main views settings, not with the settings for a particular view) to see the names to use.