Skip to content

Instantly share code, notes, and snippets.

@vsdsantos
Created July 20, 2020 21:30
Show Gist options
  • Save vsdsantos/309478d170d159ba2a8383f97c8b2c30 to your computer and use it in GitHub Desktop.
Save vsdsantos/309478d170d159ba2a8383f97c8b2c30 to your computer and use it in GitHub Desktop.
import csv
import psycopg2
from psycopg2.extras import execute_batch
host = ''
port = ''
db = ''
user = ''
password = ''
conn = psycopg2.connect(host=host, port=port, dbname=db, user=user, password=password)
cur = conn.cursor()
cur.execute('SELECT * FROM tb_search_keywords;')
cur.fetchone()
cur.close()
conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment