Switching power source using P-channel MOSFET
The answer given already, addresses the question very well. Obviously, the simplest approach is to have two diodes (Schottky) for each supply.

Another thing you could try and it's still going to be cheap, is something like the following (in line with what you're initially doing and probably within budget since I saw that was one of your concerns):







simulate this circuit &ndash; Schematic created using CircuitLab

If V1 is present and V2 is not, then the PMOS is will be on (initially through the body diode, but very shortly after the MOSFET will turn on—once VGS(on) is established ~-5V) and this is the path for current flow. If V2 is present and V1 is not, then the PMOS is off (VGS ~ 0V) and the current flow will be from V2, through the Schottky, and out to the regulator. If both V1 and V2 are present, the path through the Schottky is still the one that will have the current flow, so V2 will rule.

The advantage of this configuration is that (if you care about very much the voltage drop) there is at least one path, that provides lower drop: The path V1 takes (\$I^2R_{DS(ON)}\$). This is useful if you had a weaker source in V1 and would like to maximize it (e.g batteries). If for example, RDS(on)=100m\$\Omega\$ at VGS=-5V and the current going into the regulator is 1A, the drop in the V1 path is about 0.1V versus 0.3V or 0.4V in the V2 path. This PMOS, as an example, presents a 65m\$\Omega\$ (max) on-resistance at -4.5V

V2's path is still not too bad, but the path through the RDS(on) of the PMOS presents an easier path (lower impedance). So you would place your more robust source at V2 and the weaker at V1.

Hope this helps.