diff --git a/common/persistence/sql/sqlplugin/postgres/queue.go b/common/persistence/sql/sqlplugin/postgres/queue.go index 0f803b5d7a8..074527e1b3e 100644 --- a/common/persistence/sql/sqlplugin/postgres/queue.go +++ b/common/persistence/sql/sqlplugin/postgres/queue.go @@ -33,7 +33,7 @@ const ( templateEnqueueMessageQuery = `INSERT INTO queue (queue_type, message_id, message_payload) VALUES(:queue_type, :message_id, :message_payload)` templateGetLastMessageIDQuery = `SELECT message_id FROM queue WHERE queue_type=$1 ORDER BY message_id DESC LIMIT 1 FOR UPDATE` templateGetMessagesQuery = `SELECT message_id, message_payload FROM queue WHERE queue_type = $1 and message_id > $2 ORDER BY message_id ASC LIMIT $3` - templateGetMessagesBetweenQuery = `SELECT message_id, message_payload FROM queue WHERE queue_type = $1 and messageid > $2 and message_id <= $3 ORDER BY message_id ASC LIMIT $4` + templateGetMessagesBetweenQuery = `SELECT message_id, message_payload FROM queue WHERE queue_type = $1 and message_id > $2 and message_id <= $3 ORDER BY message_id ASC LIMIT $4` templateDeleteMessageQuery = `DELETE FROM queue WHERE queue_type = $1 and message_id = $2` templateDeleteMessagesBeforeQuery = `DELETE FROM queue WHERE queue_type = $1 and message_id < $2` templateRangeDeleteMessagesQuery = `DELETE FROM queue WHERE queue_type = $1 and message_id > $2 and message_id <= $3`