Re: stdin/stdout mismatch for COPY and \copy

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: stdin/stdout mismatch for COPY and \copy
Дата
Msg-id 27310.1081533573@sss.pgh.pa.us
обсуждение исходный текст
Ответ на stdin/stdout mismatch for COPY and \copy  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: stdin/stdout mismatch for COPY and \copy  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think the biggest problem is that stdin/stdout in COPY is different
> from \copy.  I propose we make stdin/stdout consistent for COPY and
> \copy, where stdin always reads from command input, and stdout always
> writes to command output.  This does break backward compatibility of
> \copy for stdin/stdout;  this change would have to be mentioned in the
> release notes.  COPY is unaffected.

> I propose we add 'pstdin', and 'pstdout' to read from psql's stdin and
> stdout.  I think that will greatly simplify our documentation, and
> clarify the stdin/stdout usage in all cases.

What is "command output" and how does that differ from stdout?

I see the need to distinguish command input from psql stdin, since psql
may be reading the command from a file, but I don't see where there's
a stdout difference.

"pstdin" seems a bit contrived; I'm just as happy with using "-" as
the existing patch did.  I'm fine with swapping the meanings to bring
\copy into line with COPY, though.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Why is libpgtcl still in CVS?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: stdin/stdout mismatch for COPY and \copy