Postgresql Function Set In Python Intersection