#NEWLINE# def open( self ) : #NEWLINE# #INDENT# self . conn = psycopg2 . connect ( ** self . db_options ) #NEWLINE# with closing ( self . conn . cursor ( ) ) as cur : #NEWLINE# #INDENT# if self . schema : #NEWLINE# #INDENT# cur . execute ( ( 'SET search_path TO %s' % self . schema ) ) #NEWLINE# #UNINDENT# cur . execute ( "SET client_encoding = 'UTF8'" ) #NEWLINE# if ( self . conn . server_version >= 80200 ) : #NEWLINE# #INDENT# cur . execute ( 'SET standard_conforming_strings = off' ) #NEWLINE# #UNINDENT# cur . execute ( 'SET check_function_bodies = false' ) #NEWLINE# cur . execute ( 'SET client_min_messages = warning' )