Re: copy notice

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: my <muratmy(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: copy notice
Date: 2002-02-21 21:31:57
Message-ID: 20020221213157.63783.qmail@web20802.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Probably because you have a '|' following your last
field in your text file, which leads COPY to think
that there is another (empty) field following that.
I suggest that you check this out, and make sure that
the data in the table is really what you expect.

If you were to (for example) have a '|' before the
first field, COPY would assume an empty field ahead of
that. The result would be that all of your fields are
offset to the right, with the final one dropped
altogether. Not a good result! Alternatively, if you
have '|' characters embedded in your data, they will
be treated as field separators, with a similar result
for that row.

In either case you would be warned by the notice that
you saw in this case. Either that, or an error due to
some datatype mismatch between the table column and
the data that is being imported to it.

--- my <muratmy(at)hotmail(dot)com> wrote:
> Hi ,
> I load a | delimited text file into a table using
> the following command :
> copy table_name from
> '/usr/local/pgsql/table_name.dat' using delimiters
> '|';
>
> and get this notice for each row :
>
> NOTICE: copy: line 21579, CopyReadNewline: extra
> fields ignored
>
> but the rows are loaded succesfully, why do I get
> this notice ?
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2002-02-21 21:33:22 Re: SQL: Are the "" around table & coloumnames necessary?
Previous Message Holger Marzen 2002-02-21 21:28:44 Re: Perl or PHP DB Access?