Received: from cook.onecert.fr (cook.onecert.fr [134.212.189.43]) by hub.org (8.8.8/8.7.5) with SMTP id MAA29679 for ; Thu, 13 Aug 1998 12:43:35 -0400 (EDT) Received: (qmail 5463 invoked by uid 501); 13 Aug 1998 16:41:46 -0000 Sender: ecm@cook.onecert.fr To: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] COPY syntax References: <17235.903021285@sss.pgh.pa.us> X-Eric-Conspiracy: there is no conspiracy. X-Attribution: ecm X-Home-Page: http://www.chez.com/emarsden/ Reply-To: emarsden@mail.dotcom.fr From: Eric Marsden Date: 13 Aug 1998 18:41:46 +0200 In-Reply-To: Tom Lane's message of "Thu, 13 Aug 1998 11:14:45 -0400" Message-ID: Lines: 26 X-Mailer: Gnus v5.6.22/Emacs 19.34 >>>>> "TL" == Tom Lane writes: TL> COPY IN/OUT data needs to be handled slightly differently from TL> data seen in SQL commands and SELECT results. In particular, TL> COPY likes to represent null values as \N, which can be confused TL> with a valid string value if you don't escape backslash. I am struggling with this right at the moment (I'm new to databases, I'm struggling with everything). Is it possible to use functions in COPY input? Specifically, I am trying to do this COPY attributes FROM 'home/ecm/prog/database/attributes.data'; where the file contains entries like (with tabs) nextval('attribute_id_sequence') Control and Monitoring \N I get an ERROR: pg_atoi: error in "nextval(attribute_id_sequence)": can't parse "nextval(attribute_id_sequence)". Should I be using auto-generated numbers and setting the sequence to an initial value instead? -- Eric Marsden emarsden @ mail.dotcom.fr It's elephants all the way down