Postgresql Function Set In Python Intersection Operator