Thread: copy from ... with delimiter '\n'

copy from ... with delimiter '\n'

From
Larry Riedel
Date:
May I be allowed to use '\n' as a delimiter for "copy from"?

I was able to use it to "copy to" a file, and it worked as
expected, but when I tried to "copy from" the file, I got an
error because it treated the end of line as the end of the
tuple (which I recognize is documented behavior).  If the
copy command expected a 1:1 relationship between the fields
in the "copy from" file and the fields in the target table,
then it seemed to me it could read the file correctly?
I can see that it might be considered too dicey to allow.


Larry