An array_filter implementation for PostgreSQL