Postgresql Function Set In Python Methods