简体   繁体   中英

ERROR: syntax error at or near "\" in Postgres

for load the script in my work throw me this error , i counted manually and give the line 1162 , the end of the line count 21787 , and i check that line and i'm not seeing the error Someone know what can be the trouble?

also the postgres version in the dabase is 9.6 and i install the 11 i don't know if that can be a trouble

LINE 1012: \N 4 a446c64465c254aca3bf7ae99ef6ee9c MD5 156360018883456211...
           ^
SQL state: 42601
Character: 21779


1011: COPY public.bitstream (bitstream_id, bitstream_format_id, checksum, checksum_algorithm, internal_id, deleted, store_number, sequence_id, size_bytes, uuid) FROM stdin;

1012:\N 4   a446c64465c254aca3bf7ae99ef6ee9c    MD5 156360018883456211287081168307980169094 t   0   1   15165   1ab67171-6431-4667-b764-9383727a0c18 

1013: \N    2   8a4605be74aa9ea9d79846c1fba20a33    MD5 90906716375288007825784141138015773604  t   0   2   1748    4b3701e4-e901-4f5f-88b2-4baf7910021b

1162: \N    4   57f901993fd3312441863f6ff4352677    MD5 137020448368323621812281407028089347246 f   0   1   474545  eab040f7-1702-4f89-a44a-f2d466bf655e

That is a follow-up error.

One likely cause for that is if you try to restore a dump generated with pg_dump -F p with a client other than psql .

Such a dump mixes SQL and data:

COPY mytable (x, y) FROM STDIN;
1   one
2   two
\.

Clients like pgAdmin will gag on that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM