Re: [PATCHES] Current-stream read for psql's \copy

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Mark Feit <mfeit+postgresql(at)notonthe(dot)net>
Subject: Re: [PATCHES] Current-stream read for psql's \copy
Date: 2004-02-10 18:41:16
Message-ID: Pine.LNX.4.33.0402101140370.29114-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 10 Feb 2004, Tom Lane wrote:

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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.

Why not make a -i switch (for input file) that does it the way Bruce wants
and leave -f alone so people who depend on it behaving the way it does
won't get a surprise in their next upgrade?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Feit 2004-02-10 18:44:22 Re: [PATCHES] Current-stream read for psql's \copy
Previous Message Rod Taylor 2004-02-10 18:20:43 Re: MS SQL features for new version

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Feit 2004-02-10 18:44:22 Re: [PATCHES] Current-stream read for psql's \copy
Previous Message Tom Lane 2004-02-10 17:42:01 Re: [GENERAL] dblink - custom datatypes don't work