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 3B3E2D1B898 for ; Fri, 15 Aug 2003 15:55:48 +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 82330-07 for ; Fri, 15 Aug 2003 12:55:37 -0300 (ADT) Received: from ohio.stageserver.net (ohio.stageserver.net [216.180.225.74]) by svr1.postgresql.org (Postfix) with ESMTP id 45D8AD1B89D for ; Fri, 15 Aug 2003 12:55:37 -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 19ngvR-0006rg-6e for pgsql-general@postgresql.org; Fri, 15 Aug 2003 10:55:37 -0500 Date: Fri, 15 Aug 2003 08:55:36 -0700 From: expect To: pgsql-general@postgresql.org Subject: Re: importing db as text files Message-Id: <20030815085536.0a9b2c39.expect@ihubbell.com> In-Reply-To: <2D92FEBFD3BE1346A6C397223A8DD3FC0923AE@THOR.goeci.com> References: <2D92FEBFD3BE1346A6C397223A8DD3FC0923AE@THOR.goeci.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/733 X-Sequence-Number: 47150 On Fri, 15 Aug 2003 11:32:20 -0400 Murthy Kambhampaty wrote: > On Friday, August 15, 2003 03:53, expect [mailto:expect@ihubbell.com] wrote: > >On Fri, 15 Aug 2003 00:32:01 -0700 (PDT) > >Stephan Szabo wrote: > > > ... > >> 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? > > > > > ... > >In this case I would expect the row to have: > > > > a | b > >---------- > > | > > abc | 5 > > > > > >Is this too much to expect? > > Your expectations don't seem consistent with the table definition, which > permits Null values are allowed in (it's ironic you would add "null ''" to > the copy statement, which says you want to treat empty strings as default > values, not null!). > Why is it ironic? I don't think you've followed the thread correctly. It's what I wanted to have happen.