Skip site navigation (1) Skip section navigation (2)

Re: COPY (query) TO file

From: Greg Stark <gsstark(at)mit(dot)edu>
To: PFC <lists(at)peufeu(dot)com>
Cc: "Greg Stark" <gsstark(at)mit(dot)edu>, "Tino Wildenhain" <tino(at)wildenhain(dot)de>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Mark Woodward" <pgsql(at)mohawksoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY (query) TO file
Date: 2006-06-03 14:22:19
Message-ID: 87r726co9w.fsf@stark.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
PFC <lists(at)peufeu(dot)com> writes:

> > I was also vaguely pondering whether all the DDL commands could be
> > generalized to receive or send COPY formatted data for repeated execution.
> > It would be neat to be able to prepare an UPDATE with placeholders and
> > stream data in COPY format as parameters to the UPDATE to execute it
> > thousands or millions of times without any protocol overhead or network
> > pipeline stalls.
>
> 	MySQL already does this for INSERT :
> 	INSERT INTO x (a,b) VALUES (1,2), (3,4), (5,6)...;

Does MySQL really let you stream that? Trying to do syntax like that in
Postgres wouldn't work because the parser would try to build up a parse tree
for the whole statement before running the command.

-- 
greg


In response to

Responses

pgsql-hackers by date

Next:From: Jim NasbyDate: 2006-06-03 14:42:03
Subject: Re: 'CVS-Unknown' buildfarm failures?
Previous:From: PFCDate: 2006-06-03 08:16:33
Subject: Re: COPY (query) TO file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group