On Sat, Aug 30, 2008 at 08:23:25AM -0400, Albretch Mueller wrote: > OK, let me try to outline the approach I would go for: > ~ > I think "COPY FROM CSV" should have three options, namely: I think you're confusing postgresql with a spreadsheet program. A database is designed to take care of your data and ensure its integrity. As such it requires a little more thought. There are client programs which will do this for you, perhaps you wan one of those? What's so hard about: create table foo (a text, b text); After which your COPY will complete fine. > 2.1) aggressive: data type, value and formatting analysis is done; if > only 1 or 0 are found declare then a BOOLEAN, if repeated data is > found (say state codes) and the stratification nodes cover the rest of > the data, stratify the data out to other extra table (they have a name > I can't recall now), index it ..., if data is kind of numeric with > front slashes and/or hyphen could they possibly be dates? if they are > definitelly dates convert them to bigint (and do the formatting in the > presentation code (also this a win-win situation with i18n code)) ... PostgreSQL has 60+ types and many look like eachother. How do you propose to differentiate? Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
Attachment:
signature.asc
Description: Digital signature