Update db/ documentation to actually be usable.

And a bugfix to pg_vars