I try to import a text file into a single column table, i.e. I don't want a single line of the source file to be delimited into columns. The file contains many different characters (tabs, commas, spaces) that could be recognized as delimiters. Since bell (CHR(7)) doesn't exist in the data file I chose it as delimiter:
COPY data_table(single_column) FROM '/tmp/data' WITH ENCODING 'LATIN1' DELIMITER CHR(7);
Unfortunately, this results in an error:
ERROR: syntax error at or near "chr"
What would be the correct syntax?
psql --versionreturns psql (PostgreSQL) 13.4 (Ubuntu 13.4-0ubuntu0.21.04.1)