COPY and custom datestyles. Or some other technique?

Поиск
Список
Период
Сортировка
От Ron
Тема COPY and custom datestyles. Or some other technique?
Дата
Msg-id c1b6aa5b-61ca-1ab6-6295-172fbc0f6c21@gmail.com
обсуждение исходный текст
Ответы Re: COPY and custom datestyles. Or some other technique?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: COPY and custom datestyles. Or some other technique?  (Thorsten Glaser <tg@evolvis.org>)
Список pgsql-general
Postgresql 13.10

$ psql -h myhost.example.com -X dba \
         -c "\copy ${tbl} from '/var/lib/pgsql/Rdb/${tbl}.csv' WITH 
DELIMITER '|';"
ERROR:  date/time field value out of range: "2013061914122501"
CONTEXT:  COPY t_id_master, line 1, column update_timestamp: "2013061914122501"

The timestamp format generated by a legacy dbms is YYYYMMDDHHmmSSCC (year to 
centisecond, with no delimiters).

Is there any way to convince Postgresql to import these fields?

There are 550+ tables, so something that I can do once on this end would 
make my life a lot easier.

-- 
Born in Arizona, moved to Babylonia.



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

Предыдущее
От: Andrey Klochkov
Дата:
Сообщение: Re: Do BRIN indexes support MIN/MAX?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: COPY and custom datestyles. Or some other technique?