We discuss the geometry of the Lagrangian quantization scheme based on (generalized) Schwinger-Dyson BRST symmetries. When a certain set of ghost fields are integrated out of the path integral, we recover the Batalin-Vilkovisky formalism, now extended to arbitrary functional measures for the classical fields. Keeping the ghosts reveals the crucial role played by a natural connection on the space of fields.