Started on PostgreSQL additions.
Removed redundant code from Session class.