# `AshPostgres.Functions.PostgresIn`
[🔗](https://github.com/ash-project/ash_postgres/blob/v2.9.0/lib/functions/postgres_in.ex#L5)

Generates a native SQL `IN (...)` clause instead of the default `= ANY(...)` array syntax.

PostgreSQL's query planner may choose different (sometimes suboptimal) indexes when using
`= ANY('{...}'::type[])` compared to `IN ($1, $2, ...)`. This function provides an escape
hatch for cases where the native `IN` syntax produces better query plans.

## Example

    filter(query, postgres_in(id, [^id1, ^id2, ^id3]))

Generates:

    WHERE id IN ($1, $2, $3)

Instead of the default:

    WHERE id = ANY($1::uuid[])

See: https://github.com/ash-project/ash/issues/2605

# `args`

# `has_partial_evaluate?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
