Question: is when pigs fly an idiom?
Answer: "When pigs fly" is an adynaton, a way of saying that something will never happen. The phrase is often used for humorous effect, to scoff at over-ambition.