On 12/29/21 13:08, ourdiaspora wrote:
"
\copy exampletable from '/local/path/to/examplefile.csv';
"
\copy exampletable from '/local/path/to/examplefile.csv with csv';
Right idea though that won’t execute for three reasons (bad quoting, missing parentheses, missing field type for the value csv). The main issue is the OP is accepting all defaults but the file format is not in the default format. Either the format needs to be changed or the OP needs to specify a combination of options that describes the file format. Specifying the csv format I think is a valid solution though there are others. The documentation describes the options, syntax, and effects sufficiently so I will not belabor the details.
David J.