Trying to save a text file from desktop
copy my_notes(notes) from  '/root/desktop/test_note.txt' 
It shows this error..
ERROR: extra data after last expected column
CONTEXT: COPY my_notes, line 3: " cher"
I'm a newbie in postgresql
Trying to save a text file from desktop
copy my_notes(notes) from  '/root/desktop/test_note.txt' 
It shows this error..
ERROR: extra data after last expected column
CONTEXT: COPY my_notes, line 3: " cher"
I'm a newbie in postgresql
COPY expects tab-separated data, with newlines separating rows.
It isn't suitable for just loading a text file into a field. To do that, I suggest using a simple script, say python and psycopg2.
To read a plain text from a file, there is also pg_read_file() - reserved for superusers, though, because of potential security implications. Details in this related answer:
Read data from a text file inside a trigger