rework the psqlrc stuff