X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 47ECDD1D2CA for ; Wed, 7 Jan 2004 18:49:50 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 70296-08 for ; Wed, 7 Jan 2004 14:49:07 -0400 (AST) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id E6E46D1CB2D for ; Wed, 7 Jan 2004 14:41:21 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id B71FD56243; Wed, 7 Jan 2004 19:41:27 +0100 (CET) Received: from colt.pezone.net (dsl-213-023-254-001.arcor-ip.net [213.23.254.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id 9C56C56240; Wed, 7 Jan 2004 19:41:26 +0100 (CET) From: Peter Eisentraut To: "Rodrigo Sakai" , pgsql-sql@postgresql.org Subject: Re: Importation wtih copy generated some wrong registers.. Date: Wed, 7 Jan 2004 19:41:25 +0100 User-Agent: KMail/1.5.1 References: <20040107135846.25590.qmail@hm10.locaweb.com.br> In-Reply-To: <20040107135846.25590.qmail@hm10.locaweb.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401071941.25114.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/43 X-Sequence-Number: 16436 Rodrigo Sakai wrote: > I did some importation from a .csv file to a table > > (this is a very small piece of the csv file, but i think its good for > the exemple. the pipe "|" is the delimiter for this file) > 001|002|30413000000045027612|002 > 001|002|30410000000218146611|002 > 001|002|30406000000664389616|002 > 001|002|30406000000607799814|002 > 001|002|30406000000664429313|002 > 001|002|30406000000607767316|002 > > > (and the respective part of the table is) > cod_empresa int4 NOT NULL, > cod_credor int4 NOT NULL, > num_contr varchar(50) NOT NULL, > cod_filial int4 NOT NULL DEFAULT 1 > > > (so, the data on my tables look like this:) > cod_empresa | cod_cliente | num_contr | cod_filial > -------------+-------------+-----------------------+------------ > 1 | 9386 | 30410000000762732212 | 3 > 1 | 7383 | 3,04100000007634E+019 | 4 > 1 | 5750 | 30410000000763546413 | 3 > 1 | 3584 | 3,04100000007627E+019 | 6 This result has mighty little to do with what you are importing, so you're either looking at the wrong table or you have some triggers that do heavy massage on your data.