# withoutChangeNotify() function · @imqueue/pg-prisma

Source: https://imqueue.org/api/pg-prisma/latest/pg-prisma.withoutchangenotify/
Published: 2026-08-28
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-prisma 2.0.0 — generated reference, not hand-written

Run `fn` in a transaction whose row changes notify nobody.

**Signature:**

```typescript
export declare function withoutChangeNotify<T>(client: RawClient, fn: (tx: RawExecutor) => Promise<T>, setting?: string): Promise<T>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| client | [RawClient](https://imqueue.org/api/pg-prisma/latest/pg-prisma.rawclient/) | A client that can open a transaction. |
| fn | (tx: [RawExecutor](https://imqueue.org/api/pg-prisma/latest/pg-prisma.rawexecutor/)) => Promise<T> | Work to run with notifications suppressed. |
| setting | string | _(Optional)_ Setting the trigger reads (default [CHANGE\_NOTIFY\_SUPPRESS\_SETTING](https://imqueue.org/api/pg-prisma/latest/pg-prisma.change_notify_suppress_setting/)). |


**Returns:**

Promise<T>

Whatever `fn` resolves to.

## Remarks

For a bulk write — an import, a backfill, a reconciliation — where the trigger would otherwise emit one notification per row. Forty thousand rows is forty thousand payloads through a single Postgres notification queue, to tell listeners something they would rather hear once.

The suppression is `SET LOCAL`, so it belongs to this transaction alone: it reverts on commit or rollback, and no concurrent session is affected. It is a setting the trigger itself reads, \*\*not\*\* `session_replication_role` — that would silence foreign-key enforcement too, and a bulk load run under it can commit orphan rows.

Do the writes on the `tx` handed to `fn`. Writes issued on the outer client go out on a different connection, where the setting was never applied, and will notify as usual.

Nothing is emitted afterwards to say what changed — a caller that suppresses is telling listeners it will account for the change itself, by bumping a revision, invalidating a tag, or announcing the import once when it is done.

## Example


```typescript
await withoutChangeNotify(pool, async tx => {
    await tx.query(bulkUpsert);
});
```

