implemented set of scripts for Postgresql 9.2