about psql copy ,we would like to seek help,Thanks.

Поиск
Список
Период
Сортировка
От 高升
Тема about psql copy ,we would like to seek help,Thanks.
Дата
Msg-id 000301da2e29$8d2a7e00$a77f7a00$@cn
обсуждение исходный текст
Ответы Re: about psql copy ,we would like to seek help,Thanks.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: about psql copy ,we would like to seek help,Thanks.  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-bugs

PSQL engineers, hello:

We encountered a problem during the process of importing data from a text file to the PG database using psql's COPY command, and we would like to seek help. The issue is that if there are any exceptional records in the file, the program exits, but we want to skip those erroneous records and continue with the rest of the import.

We have looked at some tutorials, and it seems that we can use the "CONTINUE" option. By using the CONTINUE option, the COPY command should ignore error rows and continue with the copying operation until all rows are copied. The relevant error information for the error rows will be recorded.

COPY table_name FROM '/path/to/data/file.csv' (FORMAT csv, DELIMITER ',', NULL '', CONTINUE);

However, when we actually tried this, an error occurred, and it seems that the parameter is not recognized.

ERROR: option "continue" not recognized

 

My psql version : psql (PostgreSQL) 12.7

 

 

 

Could this be due to the version? Are there any other ways to handle this? Thank you for your support.

 

Best Regards.

Gaosheng

2023-12-14 from China

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #18246: pgstathashindex() attempts to read invalid file for hash index attached to partitioned table
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: about psql copy ,we would like to seek help,Thanks.