I'm not able to do a select in the PostgreSQL database. Python 3.
conn = psycopg2.connect(host="localhost", dbname='postgres', user='postgres', password=postgres)
cur = conn.cursor()
cur.execute("select id_log, nm_ip, dh_chamada, nm_tipo, nm_contexto, cd_http, in_tamanho from tb_log")
cur.fetchone()
Error result:
cur.execute("select id_log, nm_ip, dh_chamada, nm_tipo, nm_contexto, cd_http, in_tamanho from tb_log") psycopg2.ProgrammingError: relation "tb_log" does not exist LINE 1: ...amada, nm_tipo, nm_contexto, cd_http, in_tamanho from tb_log ^
Base PostGres:
SELECT id_log, nm_ip, dh_chamada, nm_tipo, nm_contexto, cd_http, in_tamanho
FROM tb_log;
Result:
1, '12 ',' 2018-06-07 13:03:13 ',' HEAD ',' / FDSFDS ', 200 , 1000