| От | Andrew Gierth |
|---|---|
| Тема | Re: Two small questions re/ COPY CSV data into table |
| Дата | |
| Msg-id | 877ea18cli.fsf@news-spur.riddles.org.uk обсуждение исходный текст |
| Ответ на | Re: Two small questions re/ COPY CSV data into table (Matthias Apitz <guru@unixarea.de>) |
| Список | pgsql-general |
>>>>> "Matthias" == Matthias Apitz <guru@unixarea.de> writes: Matthias> it is exported into the file as Matthias> cmd \| lpr ... Matthias> because the export delimiter is set to '|'; Matthias> the COPY in text mode was complaining because it interpreted Matthias> the | of the sequence \| as an delimiter and the number of Matthias> columns did not matched. Matthias> I will provide tomorrow the exact input line, the exact COPY Matthias> command and the error. This worked for me: postgres=# copy ct(a,b,c,d,e) from stdin with delimiter '|'; Enter data to be copied followed by a newline. End with a backslash and a period on a line by itself, or an EOF signal. >> 0|1| cat $1 \| lpr -Pprinter |3|4 >> \. COPY 1 -- Andrew (irc:RhodiumToad)
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера