X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2FSQL%2FPostgreSQL%2F20%2Fupdate_buffer_lastseen.sql;fp=src%2Fcore%2FSQL%2FPostgreSQL%2F20%2Fupdate_buffer_lastseen.sql;h=98218a641afa04497caebd4abd039bdb432dda6f;hp=55415050908c2e5a800fda8d94a7ac52775a2de3;hb=10ee60164fb3701b20c439269f170a4f2cb2e2a9;hpb=dd449b81ff7f4499bef360a9a3676e48d794adcc diff --git a/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql b/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql index 55415050..98218a64 100644 --- a/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql +++ b/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql @@ -1,3 +1,3 @@ UPDATE buffer -SET lastseenmsgid = :lastseenmsgid +SET lastseenmsgid = min(:lastseenmsgid, buffer.lastmsgid) WHERE userid = :userid AND bufferid = :bufferid