Update for postgresql 9.X+