X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 52F1953C81 for ; Sat, 9 Apr 2005 00:59:36 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80970-05 for ; Fri, 8 Apr 2005 23:59:35 +0000 (GMT) Received: from smtp.gvtc.com (smtp3.gvtc.com [216.177.160.85]) by svr1.postgresql.org (Postfix) with SMTP id CCF9453349 for ; Sat, 9 Apr 2005 00:59:34 +0100 (BST) Received: (qmail 23684 invoked from network); 8 Apr 2005 23:58:42 -0000 Received: from ip-12-181-66-221.dsl0-blvrtx.gvtc.com (HELO ?192.168.1.102?) (12.181.66.221) by smtp.gvtc.com with SMTP; 8 Apr 2005 23:58:42 -0000 Message-ID: <4256C5D3.3050102@gvtc.com> Date: Fri, 08 Apr 2005 17:56:35 +0000 From: Jim Johannsen User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-sql@postgresql.org Subject: Re: Numeric and CSV under 8.0.1 ? References: <20050408165147.GV30669@survivor.hades> In-Reply-To: <20050408165147.GV30669@survivor.hades> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.105 tagged_above=0 required=5 tests=AWL, DATE_IN_PAST_06_12 X-Spam-Level: X-Archive-Number: 200504/131 X-Sequence-Number: 21024 Stef: Why is iuserid numeric? Are you going to do any math on the field? If not, change it to varchar. In the long run you'll be happier. Stef wrote: >Hello Everyone, > Currently, here at work, I am doing the whole >'advocacy' part of postgreSQL. It's not really hard to >do, as the other database's are MySQL and Sybase ;) > > There is obviously a whole spat of data munging >going on in the background, and I noticed that psql in >8.0.1 now accepts CSV ! Great. > > Except, it doesn't really appear to be 100% there. >Numeric's wrapped in '...' don't want to appear to go in. >Is this a 'known problem' ? > > Table "public.visitor_main" > Column | Type | Modifiers >------------------+----------------------+------------------------------ > iuserid | numeric(12,0) | not null > firstname | character(25) | not null > lastname | character(25) | not null > > >Sample Data line >'3236','Alonzo','Peter' > >ERROR: invalid input syntax for type numeric: "'3236'" >CONTEXT: COPY visitor_main, line 1, column iuserid: "'3236'" > > > Thoughts ? > Regards > Steph > >