View Single Post

   
  #2 (permalink)  
Old 04-15-2008, 11:38 PM
Andrew Dunstan
 
Posts: n/a
Default Re: duplicate columns with COPY



Peter Eisentraut wrote:
> Is there a reason why COPY TO STDOUT does not allow columns to be specified
> more than once?
>
> pei=# copy test1 (a, a) to stdout;
> ERROR: 42701: column "a" specified more than once
>
> Or is this just an overly extensive check that is actually intended for COPY
> FROM STDIN?
>
>


You should be able to get around it with:

COPY (SELECT a , a FROM test1) TO stdout;

cheers

andew

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply With Quote