我的foo.sql
文件包含以下内容:
-- ...
COPY service_types (id, name, created_at, updated_at, metadata, "primary") FROM stdin;
26 AWS Other 2014-11-18 10:28:30.642037 2014-11-18 10:28:30.642037 f
27 AWS Marketplace 2014-11-18 10:34:40.87182 2014-11-18 10:34:40.87182 f
3 AWS EC2 2014-11-06 11:04:30.877178 2014-11-06 11:04:30.877178 f
\.
-- ...
当我尝试使用
导入它时psql -h localhost -d database -U user -f foo.sql
我收到以下错误:
psql:20150807_service_types.sql:48: invalid command \.
psql:20150807_service_types.sql:55: ERROR: syntax error at or near "26"
LINE 1: 26 AWS Other 2014-11-18 10:28:30.642037 2014-11-18 10:28:30....
任何人都可以看到问题的根源吗?