Working on plugging in postgres bits