D-2, when done right, is moderately stain resistant. I've experienced light staining when working with D-2 around food stuff and out in moist environments. I've not yet seen any outright rust on my own D-2 knife and the Dozier's that I own.
If you are looking for maximum stain resistance in a regular type of cutlery steel, the 440 series is really the way to go. You'll find mainly 440-a and 440-c in the mainstream factory offerings. Many handmade knifemakers, myself included, use 440-c. It is a very good cutlery grade steel when you want good edge holding and great corrosion resistance.
Randall Made Knives uses 440-b as it's stainless and they forge it to boot.

I don't own a Randall, but I've yet to hear anything bad about them.
The 440 series has between 17-18% Chromium in their make-up. As far as I know, this is pretty much at the top of the heap for stainless steels that have Iron as the bulk of their make-up.
If you go with the real exotics like Talonite, Stellite and Boye's dendritic Cobalt, you'll find the bulk of their make-up is Cobalt which is probably as corrsion proof as you can get.
Of course, flint knives don't corrode either now that I think of it. It holds a damn good edge too.