2

I have a Postgresql dump file which i'm trying to restore. I get this error regarding an invalid data i guess.

ERROR: invalid input syntax for integer: "."

and when i checked the file, there are data like this:

469215  2009-10-10 18:16:47.041377  0   1
471217  2009-10-10 18:25:12.536352  0   1
473224  2009-10-17 09:46:43.041604  0   1
473228  2009-10-22 10:58:40.194244  0   1
.

so i was wondering what is this "." do? i check some other working dumps and they ended their data line with "." which i guess it's the correct syntax!

Please tell me what's the correct syntax and what does it do? thank you

4

1 回答 1

2

似乎它标志着 COPY 语句的结束

文档

End of data can be represented by a single line containing just backslash-period (\.).
 An end-of-data marker is not necessary when reading from a file, since the end of file 
serves perfectly well; it is needed only when copying data to or from client
applications using pre-3.0 client protocol.
于 2009-12-30T08:02:40.767 回答