Skip to content

Instantly share code, notes, and snippets.

@schnipdip
Created September 19, 2020 15:32
Show Gist options
  • Save schnipdip/29080ce8acf78440511cfd0506d72256 to your computer and use it in GitHub Desktop.
Save schnipdip/29080ce8acf78440511cfd0506d72256 to your computer and use it in GitHub Desktop.
Inserting Objects to #Postgresql Database
import psycopg2
def insert_object():
#Referece: Constructing #Postgresql connection obect
cursor.execute("""INSERT INTO TABLENAME(COLUMNS)\
VALUES (%s)""",(OBJECT))
conn.commit()
conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment