psycopg2.ProgrammingError: syntax error at or near "stdin" error when trying to copy_from redshift
AWS Redshift is not PostgreSQL, though it supports a subset of PostgreSQL syntax and functionality.
It does not have COPY ... FROM STDIN
.
See the manual for how to use COPY
on Redshift.
check this solution Python psycopg2 insert NULL in some rows in postgresql table
for insert multiple rows or python dataframe in Redshift