import psycopg2
import json

conn = psycopg2.connect(database = 'cmrobot',user = 'cmrobot', password = 'cmrobot',host = '192.168.2.31',port = '5432')

curs = conn.cursor()

sql = "select jsondata from znfz_wsst_nlp where bmsah = '瓯检起诉受[2020]33030401160号'"

curs.execute(sql)

data = curs.fetchall()
print("python原始数据：",data)
print(type(data))

curs.close()
conn.close()
