Bruce Momjian wrote:
Also, I came upon this gem:
$ echo '\\copy test to stdout' | psql -o /tmp/z test
444
444
444
444
444
Seems 'copy to stdout' also has this split idea of sending \copy output
to a different place from other output.
I guess my big
Bruce Momjian wrote:
Bruce Momjian wrote:
What do people want to do with the current \copy behavior for stdin?
Right now if you supply a file name with queries using psql -f, the copy
input is read from the terminal, not from the file.
Actually, I was wrong. Right now \copy reads
Mark Feit wrote:
This patch against 7.4.1's psql and the documentation adds the option
of reading rows from the current input stream (standard input, -f
xxx, \i xxx) during a \copy ... from operation in psql. The details
were proposed and discussed (somewhat) here:
Tom Lane wrote:
Bruce Momjian [EMAIL PROTECTED] writes:
'psql test /tmp/x' works fine, but 'psql -f /tmp/x test' hangs waiting
for input from stdin. Why would we want STDIN to read from the terminal
if all commands are being read from a file with -f?
Actually, that behavior is extremely
Bruce Momjian [EMAIL PROTECTED] writes:
'psql test /tmp/x' works fine, but 'psql -f /tmp/x test' hangs waiting
for input from stdin. Why would we want STDIN to read from the terminal
if all commands are being read from a file with -f?
Actually, that behavior is extremely useful. Consider
Bruce Momjian [EMAIL PROTECTED] 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?
Bruce Momjian [EMAIL PROTECTED] writes:
I will do it by vote, not because _I_ decide it is unintuitive. And I
don't have to talk _you_ into it, just a majority of developers.
[shrug...] Put it to a vote if you want; I feel sure you will lose.
There is another argument in favor of being able
What do people want to do with the current \copy behavior for stdin?
Right now if you supply a file name with queries using psql -f, the copy
input is read from the terminal, not from the file.
I propose changing that so psql reads \copy input from the file so it is
consistent with COPY and is
Bruce Momjian [EMAIL PROTECTED] 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
Tom Lane wrote:
Bruce Momjian [EMAIL PROTECTED] 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
Tom Lane wrote:
Bruce Momjian [EMAIL PROTECTED] 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
On Tue, 10 Feb 2004, Tom Lane wrote:
Bruce Momjian [EMAIL PROTECTED] 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
Mark Feit [EMAIL PROTECTED] writes:
What precipitated the patch in the first place was a need to be able
to do copies in-line to populate tables with small amounts of initial
data.
Right, that's clearly useful. The debate at hand is about the
usefulness of the other behavior.
BTW, pg_dump
On Tue, Feb 10, 2004 at 12:33:10PM -0500, Bruce Momjian wrote:
What do people want to do with the current \copy behavior for stdin?
I'd like to hear more discussion of Tom's argument about security
before the decision is taken.
--
Andrew Sullivan
---(end of
Andrew Sullivan wrote:
On Tue, Feb 10, 2004 at 12:33:10PM -0500, Bruce Momjian wrote:
What do people want to do with the current \copy behavior for stdin?
I'd like to hear more discussion of Tom's argument about security
before the decision is taken.
Tom's point is that you can feed
Bruce Momjian wrote:
What do people want to do with the current \copy behavior for stdin?
Right now if you supply a file name with queries using psql -f, the copy
input is read from the terminal, not from the file.
Actually, I was wrong. Right now \copy reads from psql's stdin, not
always
16 matches
Mail list logo