Problems importing data from plain text file

Поиск
Список
Период
Сортировка
От Mário Gamito
Тема Problems importing data from plain text file
Дата
Msg-id 413DCC8E.3000800@netual.pt
обсуждение исходный текст
Список pgsql-general
Hi,

I have this plain text file with about 5000 lines.
Each line may have 4 or 5 fields, all delimited with a tab.

I've made a table named t_zip_codes with 5 fields.

When i run (in postgres command line) the command

COPY t_zip_code FROM zip_codes.txt;

it aborts as soon as it reaches a line with only 4 fields in the text
file, because the table t_zip_codes have 5 fields.

How can i solve this annoyance ?
All my fields are character varying.

Any help would be appreciated.

Warm regards,
Mário Gamito

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

Предыдущее
От: Dino Vliet
Дата:
Сообщение: Re: error: insert has more expressions than target column
Следующее
От: Alex Soto
Дата:
Сообщение: supressing NOTICE messages on Windows/cygwin only not working?