Re: duplicate columns with COPY

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: duplicate columns with COPY
Дата
Msg-id 476A75CB.6080102@dunslane.net
обсуждение исходный текст
Ответ на duplicate columns with COPY  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: duplicate columns with COPY  (NikhilS <nikkhils@gmail.com>)
Список pgsql-hackers

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: duplicate columns with COPY
Следующее
От: NikhilS
Дата:
Сообщение: Re: duplicate columns with COPY