Re: Fixed width COPY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixed width COPY
Дата
Msg-id 24136.989280554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fixed width COPY  (webb sprague <wsprague@o1.com>)
Список pgsql-general
webb sprague <wsprague@o1.com> writes:
> Does anybody know of a good way to COPY a file into a table if the data is
> based on fixed width format?

COPY insists on having delimiters; you'll need to translate the file
format into something COPY can deal with.

> Do I just have to write some code with scanf(Ick)?

If you like C, that would work, but you could doubtless accomplish the
same result with very short scripts in sed, awk, perl, tcl, or half a
dozen other text-bashing tools.  Pick your poison...

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 7.1-1 installation from RPM
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: Auto-timestamp generator (attached)