Solar and stellar planetary systems