Load data into postgresql from file with trailing delimiter
You could also pre-process the file as suggested by Vérace:


  Or  sed s'/.$//'


from How to shave off last character using sed? by codaddict on Stack Overflow.

Or sed -i ... (inplace - I tend to avoid this, because in case of a mistake, you've lost your original file) or sed .... &gt; table.txt.