novice <user.postgresql@xxxxxxxxx> writes: > db5=> \copy maintenance FROM test.txt > ERROR: invalid input syntax for integer: "3665 OK SM > 07/07/13 06:09" > CONTEXT: COPY maintenance, line 1, column maintenance_id: "3665 OK > SM 07/07/13 06:09" It looks to me like your problem is mostly that you don't have tabs between the fields. I don't think COPY can be taught to parse this input directly --- you need to preprocess the file to split the fields apart. BTW: after you get it split into fields, you're also going to find that "OK" is not valid input for the integer "meter_id" column. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly