Re: [PATCHES] Current-stream read for psql's \copy - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [PATCHES] Current-stream read for psql's \copy
Date
Msg-id 200402101716.i1AHG0q07508@candle.pha.pa.us
Whole thread Raw
In response to Re: [PATCHES] Current-stream read for psql's \copy  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> I propose we not break existing applications.  If we change it the way
> >> you suggest, there'll be no way to do the above.
> 
> > But does anyone use such a capability?
> 
> What, you're going to remove a feature because you don't think it's
> used?  We've been burnt by that approach before.

Yes.  We get burnt by it, but we also remove stuff we don't get burnt
by, so it is a value judgement.

> > The program has to generate \. to terminate the input
> 
> No it doesn't.  EOF will do fine.  The source program doesn't
> necessarily have to know anything about COPY, as long as its output is
> in a format COPY can cope with (eg, tab-delimited).

The current behavior seems quite strange and counter-intuitive.  We
might break the code for 1-2 people, but we will make it more
predicable for everyone using it.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Current-stream read for psql's \copy
Next
From: "scott.marlowe"
Date:
Subject: Re: [PATCHES] Current-stream read for psql's \copy