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

From Tom Lane
Subject Re: [PATCHES] Current-stream read for psql's \copy
Date
Msg-id 17134.1076433826@sss.pgh.pa.us
Whole thread Raw
Responses Re: [PATCHES] Current-stream read for psql's \copy  ("scott.marlowe" <scott.marlowe@ihs.com>)
stdin/stdout mismatch for COPY and \copy  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> 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.

I don't think it's acceptable to simply remove the functionality.
If you wanted to argue about swapping the meanings of STDIN and -
(as defined by the patch) then we could debate about which way is
more consistent and whether it's worth breaking backwards compatibility
to improve consistency.  I could probably be talked into supporting
that; as you say, we've done that before.  But taking out a useful
behavior that has been there a long time, simply because you've decided
it's unintuitive, is not okay.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Current-stream read for psql's \copy
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Current-stream read for psql's \copy