postgresql新手
想用rds_dbsync将mysql的数据同步至postgresql,在同步表结构的时候会发生如下错误:table copy failed Query 'COPY "alpha" FROM stdin DELIMITERS '|' with csv QUOTE ''''': ERROR: relation "alpha" does not exist
通过rds_dbsync工具答应出来的执行命令为:CREATE TABLE IF NOT EXISTS alpha (id int4, content text);
我在控制台通过如下命令echo 'create table alpha (id int4, content text);' | psql -U postgres -c 'COPY "alpha" FROM STDIN'
复现了错误,不知道是哪里出错了如何解决,请赐教
copy等于批量insert,你要先创建表再copy.