Re: [HACKERS] duplicate columns with COPY

2007-12-27 Thread Peter Eisentraut
Am Donnerstag, 20. Dezember 2007 schrieb Tom Lane: > I think it's reasonable even for COPY TO, since IMHO the odds that it's > a typo, rather than intentional, are probably 100:1. ISTM that with this line of argument we could disable thousands of valid uses of SQL commands. -- Peter Eisentraut

Re: [HACKERS] duplicate columns with COPY

2007-12-20 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > 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 inte

Re: [HACKERS] duplicate columns with COPY

2007-12-20 Thread NikhilS
Hi, > > > > 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? > > > > > This seems to be a common check in both "COPY TO" and "COPY FROM" cases source/des

Re: [HACKERS] duplicate columns with COPY

2007-12-20 Thread Andrew Dunstan
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?