stats: cast jsonb chunk param via text so jsonb_populate_recordset gets an array (step 2 loads)
All checks were successful
Deploy production / deploy (push) Successful in 1m11s
All checks were successful
Deploy production / deploy (push) Successful in 1m11s
This commit is contained in:
@@ -264,7 +264,7 @@ export async function insertChunks(
|
||||
.join(', ');
|
||||
for (let i = 0; i < rows.length; i += size) {
|
||||
await tx.unsafe(
|
||||
`insert into stats.${table} (${cols}) select ${cols} from jsonb_populate_recordset(null::stats.${table}, $1::jsonb) ${conflict}`,
|
||||
`insert into stats.${table} (${cols}) select ${cols} from jsonb_populate_recordset(null::stats.${table}, ($1::text)::jsonb) ${conflict}`,
|
||||
[JSON.stringify(rows.slice(i, i + size))] as never
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user