update code snippets and add postgresql