From: Eric Marsden <emarsden@mail.dotcom.fr>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] COPY syntax
Date: 13 Aug 1998 18:41:46 +0200
Message-ID: <m24svgsuk5.fsf@cook.onecert.fr> (raw)
References: <17235.903021285@sss.pgh.pa.us>
>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: emarsden@mail.dotcom.fr
Subject: Re: [INTERFACES] COPY syntax
In-Reply-To: <m24svgsuk5.fsf@cook.onecert.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox