Thread: Muiltiple commands to psql yeilds a bad COPY

Muiltiple commands to psql yeilds a bad COPY

From
"Bryan White"
Date:
I think I found a bug in psql or the backend.

If from a shell script I execute:
   psql -c"delete from action; copy action from stdin using delimiters '|';"
< action.out
then the first field of the first row gets a 'Q' insdead of the 'D' that is
in the input file.
The rest of the table seams to be correct.

If I break the statement abort as in:
   psql -c"delete from action;"
   psql -c"copy action from stdin using delimiters '|';" < action.out
then it works as I expect.

This is 6.3.2.  It is just a minor annoyance to me but someone might want to
see if it is a problem in 6.4.

Bryan White
ArcaMax Inc.
Yorktown VA
www.arcamax.com