>>>>> "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