Puppet-postgresql is a project mainly written in ..., it's free.
A Puppet module for managing postgres