According to COPY documentation , I can use query option when exporting data. Can I use query VALUES when loading data into tables from txt file? If I have 2 columns and I want to insert record manually in the first column(SentenceID) and insert data in the second column(Sentence) from text file. Is it something like:
copy foo1(Sentence) | (VALUES (2339)) from '/path/to/sentence.txt' with delimiter '*';
Directly? No. the entirity of the data being imported must exist within the specified input file. If the file contains fewer columns than the target table, or in a differing order, you can specify column names. Any columns not specified will take on their default value. If the column is a "serial" column is will get its default value from the corresponding sequence.
How to use exactly options in COPY command, it has {} | [] symbols in documentation.
{} - means required; choose one of the listed options
[] - mean options; choose on of the listed options (possibly only one)