Page-dependent sidebar
Small CSS fix
Use idiomatic (albeit a bit ugly) Postgres way of doing "UPSERT"

Request data is now processed by SQL procedures that loop over
the data trying to update it or insert it. The upside is that
this doesn't require exclusive table locking and minimizes
application code.