update script to postgresql 9.2