some misc postgresql fettling scripts