Since this is my first posting of 2010, let's start with prices. Take a look at the chart, below, which shows home price indices for San Francisco as well as the nine-county Bay Area.

San Francisco prices plateaued in the summer of 2005 and remained fairly stable until the summer of 2008. Then, during the six-month period ending in January of 2009, prices fell by more than 25%. They bounced back strongly in February and have remained fairly stable since then, at a level that's only about 15% below the peak.
Prices in the greater Bay Area also plateaued in the summer of 2005, but remained at peak levels for only two years instead of three. The subsequent price decline was both longer and more dramatic than in the case of San Francisco. Over the 18-month period ending in March of 2009, Bay Area home prices fell by a whopping 45%. Home prices (along with stock prices) bounced back strongly when it became clear that the economy wasn't sliding into depression. Even so, Bay Area home prices are still about 35% lower than they were at the peak.
Perhaps there's an economic justification for the strong relative performance of the San Francisco market, as compared to the greater Bay Area . I suspect, however, that the main reason why San Francisco has held up better than the greater Bay Area is that San Francisco homeowners generally have more financial staying power than their counterparts in the greater Bay Area.