X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9D83CD1B539 for ; Fri, 15 Aug 2003 07:53:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 11713-01 for ; Fri, 15 Aug 2003 04:53:02 -0300 (ADT) Received: from ohio.stageserver.net (ohio.stageserver.net [216.180.225.74]) by svr1.postgresql.org (Postfix) with ESMTP id E6848D1B524 for ; Fri, 15 Aug 2003 04:53:00 -0300 (ADT) Received: from ip68-6-45-108.sb.sd.cox.net ([68.6.45.108] helo=localhost.localdomain) by ohio.stageserver.net with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.20) id 19nZOR-0001JM-Hc for pgsql-general@postgresql.org; Fri, 15 Aug 2003 02:53:03 -0500 Date: Fri, 15 Aug 2003 00:53:03 -0700 From: expect To: Subject: Re: importing db as text files Message-Id: <20030815005303.17eb4c7d.expect@ihubbell.com> In-Reply-To: <20030815002727.Q9630-100000@megazone.bigpanda.com> References: <20030814211528.02759176.expect@ihubbell.com> <20030815002727.Q9630-100000@megazone.bigpanda.com> Organization: iHubbell X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ohio.stageserver.net X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - ihubbell.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/719 X-Sequence-Number: 47136 On Fri, 15 Aug 2003 00:32:01 -0700 (PDT) Stephan Szabo wrote: > > On Thu, 14 Aug 2003, expect wrote: > > > On Thu, 14 Aug 2003 12:46:07 -0500 > > Bruno Wolff III wrote: > > > Note that it isn't obvious what empty strings should map to for numbers. > > > NULL and 0 make about as much sense as using the default value. > > > > Well I'm new here but it seems to me they should map to the default value > > for that column. Why wouldn't they? > > One problem with doing that is that it's inconsistent. Please elaborate. How is it inconsistent, exactly? > > Given > create table test( > a text default 'abc', > b int default 5 > ); > > copy test from stdin with delimiter ','; > , > \. > > What would you expect the values of the row in test > to be? Oh a test.... Does the \. end the STDIN input? Where's the null option? Don't you mean: copy test from stdin with delimiter ',' null ''; In this case I would expect the row to have: a | b ---------- | abc | 5 Is this too much to expect? > > >