import psycopg2 import psycopg2.extras
def redshif_connect():####### connection and session creation ##############print("redshif_connect start......")conn = psycopg2.connect(dbname="RS_DB_NAME", host="HOST_NAME",port="RS_PORT", user="USER_NAME", password="PWD")print('redshif connection variable', conn)self.cursor = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
Note: Only a member of this blog may post a comment.