Open richardhuaaa opened 2 months ago
For anyone else in the same situation, I've found a workaround, although I'm unsure yet how the performance compares:
WITH cursors AS (
SELECT
UNNEST(@cursor_node_ids::INT[]) AS cursor_node_id,
UNNEST(@cursor_sequence_ids::BIGINT[]) AS cursor_sequence_id
)
SELECT
envelopes.*
FROM
envelopes
LEFT JOIN cursors ON envelopes.originator_node_id = cursors.cursor_node_id
WHERE ...
AND (cursor_sequence_id IS NULL
OR envelopes.originator_sequence_id > cursor_sequence_id)
...;
What do you want to change?
Is there any support for passing a slice of variable length and mapping it into clauses of a postgres query, like in this pseudo-code?
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go