PostgreSQL: Improve performance and squish bug.
authorAlex Ingram <reimu@reimuhakurei.net>
Fri, 3 Mar 2017 20:05:30 +0000 (14:05 -0600)
committerAlex Ingram <reimu@reimuhakurei.net>
Fri, 3 Mar 2017 20:08:17 +0000 (14:08 -0600)
commitdd449b81ff7f4499bef360a9a3676e48d794adcc
treeb57adc99d06f24da9af7a82e73b77bf43ca01840
parentdf3e1433ea4850e57cade871ced1b0eab4fd785a
PostgreSQL: Improve performance and squish bug.

Improve performance of the unread messages backlog fetcher by using a normal JOIN instead of a LEFT JOIN.

Correct for bug in which buffer.lastseenmsgid was set to a value higher than buffer.lastmsgid. This is a client bug, but this prevents it from screwing up the database.
src/core/SQL/PostgreSQL/20/select_messagesNewerThan.sql
src/core/SQL/PostgreSQL/20/select_messagesRange.sql
src/core/SQL/PostgreSQL/20/setup_050_buffer.sql
src/core/SQL/PostgreSQL/20/upgrade_003_correct_bad_lastseenmsgid.sql [new file with mode: 0644]
src/core/SQL/PostgreSQL/20/upgrade_004_add_lastseenmsgid_constraint.sql [new file with mode: 0644]
src/core/sql.qrc