Updated the postgres example code for chapter 5.4