Metformin is sometimes used during pregnancy to manage gestational diabetes, but its safety is still a topic of research. Pregnant women should discuss the risks and benefits with their healthcare provider.