Set client encoding and fix identation

client encoding set with pg_set_client_encoding not in constructor pg_connect
uniform identation with tab character(4space)