Re: Updated COPY CSV patch

Поиск
Список
Период
Сортировка
Искать
От
Andrew Dunstan
Тема
Re: Updated COPY CSV patch
Дата
Msg-id
407D8075.4080804@dunslane.net
Ответ на
Список
Дерево обсуждения
Re: Updated COPY CSV patch "Andrew Dunstan" <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruno Wolff III <bruno@wolff.to>
Re: Updated COPY CSV patch Andrew Dunstan <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch Andrew Dunstan <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch Peter Eisentraut <peter_e@gmx.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch "Andrew Dunstan" <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch Andrew Dunstan <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plan for CSV handling of quotes, NULL Tom Lane <tgl@sss.pgh.pa.us>
Re: Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plan for CSV handling of quotes, NULL Tom Lane <tgl@sss.pgh.pa.us>
Re: Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plan for CSV handling of quotes, NULL "Andrew Dunstan" <andrew@dunslane.net>
Re: Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plan for CSV handling of quotes, NULL "Andrew Dunstan" <andrew@dunslane.net>
Re: Plan for CSV handling of quotes, NULL Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch Tom Lane <tgl@sss.pgh.pa.us>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch Tom Lane <tgl@sss.pgh.pa.us>
Re: Updated COPY CSV patch Andrew Dunstan <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: Updated COPY CSV patch Andrew Dunstan <andrew@dunslane.net>
Re: Updated COPY CSV patch Bruce Momjian <pgman@candle.pha.pa.us>
Bruce Momjian wrote:

>
>Do we need control for each column?  What if we go with preferring NULL
>for comma-comma, and then print warnings for NOT NULL columns and try
>the promote.  If you want comma-comma to be zero-length string, you can
>create the column with NOT NULL, load the file, then ALTER TABLE to
>allow NULL's again.  Basically, the NOT NULL specification on the column
>is the COPY CSV control method, rather than having it be in COPY.
>
>  
>


If we can't do type specific stuff then we need to be able to have 
column-specific controls on export, at least.

Consider a text column containing US 5-digit ZIP codes. If they are not 
quoted, a spreadsheet will almost certainly not preserve the leading 
zero some of them have, producing very undesirable results. However, a 
genuine numeric-type field must not be quoted, or the same spreadsheet 
won't see that value as a number. Unless we do stuff based on type, we 
have no way of knowing from the text representation of the data what we 
really need. Thus my proposal from this morning for column-specific user 
control over this aspect. And if we are going to have per column user 
control on export, why not on import too, to handle the NOT NULL 
problem? It might make life easier for us code-wise than chasing down 
nullability (e.g. in domains).

cheers

andrew






В списке pgsql-patches по дате отправления
От: Bruce Momjian
Дата:
Сообщение: Re: Updated COPY CSV patch
От: Bruce Momjian
Дата:
Сообщение: Re: Updated COPY CSV patch
FAQ