We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2c8fe8 commit 580cec2Copy full SHA for 580cec2
lib/index.ts
@@ -422,7 +422,10 @@ export class PostgresAdapter extends Adapter {
422
document.type,
423
this.channel
424
);
425
- await this.pool.query(`NOTIFY "${this.channel}", '${payload}'`);
+ await this.pool.query(`SELECT pg_notify($1, $2)`, [
426
+ this.channel,
427
+ payload,
428
+ ]);
429
430
this.scheduleHeartbeat();
431
} catch (err) {
@@ -448,7 +451,7 @@ export class PostgresAdapter extends Adapter {
448
451
type: document.type,
449
452
attachmentId,
450
453
});
- this.pool.query(`NOTIFY "${this.channel}", '${headerPayload}'`);
454
+ this.pool.query(`SELECT pg_notify($1, $2)`, [this.channel, headerPayload]);
455
}
456
457
/**
0 commit comments