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 qu
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 \cop
Bruce Momjian 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.
Well, here's my vote on the subject: I purposefully avoided changing
the existing behavior because (a) it would break something I
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
alwa
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
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 broad
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_dum
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
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
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
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 a
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 m
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 abl
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
us
Bruce Momjian <[EMAIL PROTECTED]> writes:
> 'psql test 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
program-that-generates-data | psql -f somescript
The
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > 'psql test > 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
> program-that-generates-d
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:
>
> http://archiv
17 matches
Mail list logo