Re: [GENERAL] Newbie Copy From not working
On Thursday 17 August 2006 03:27 pm, Walter Vaughan [EMAIL PROTECTED] thus communicated: The problem is I need to load a field that is allowed to be null with nothing and it work The above statement is not the problem you are having. We dumped and loaded a 4 gig Progress database with copy and there were many instances of ||value||more|and more| in the dump file. There is something else wrong with the line of data. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Newbie Copy From not working
On Thu, Aug 17, 2006 at 03:27:26PM -0400, Walter Vaughan wrote: Admin_=# COPY DATA_IMPORT_CUSTOMER FROM '/tmp/sold.pg' delimiter '|' null ''; ERROR: missing data for column processed_timestamp CONTEXT: COPY data_import_customer, line 1: (xxx) xxx-||Mary|Smith|76 Crest Street||Jersey City|NJ|07302-|New Jersey|USA||XXX|XXX-1... The table you posted has 42 columns; at least one line in the file doesn't have that many fields. Here's an easy way to count the number of fields on each line in the file: awk -F'|' '{print NR, NF}' /tmp/sold.pg Suggestion: fix the file so each line has the same number of fields as the table has columns. -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] Newbie Copy From not working
Michael Fuhr wrote: On Thu, Aug 17, 2006 at 03:27:26PM -0400, Walter Vaughan wrote: ERROR: missing data for column processed_timestamp The table you posted has 42 columns; at least one line in the file doesn't have that many fields. Yes, we didn't have the right number of columns... We've had only experience with MySQL's tools which are much less picky. :( We've also discovered that it will also stop on fields that are too wide. I'm fairly sure that its better for the transaction to fail and tell us that it would be chopping off data rather than to just go on silently and stripping off data... Thanks as well to terry at esc1.com for helping. -- Walter ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match