Re: SQL COPY syntax extension (was: Performance on inserts)

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Oliver Teuber <teuber(at)abyss(dot)devicen(dot)de>, Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SQL COPY syntax extension (was: Performance on inserts)
Date: 2000-08-28 15:39:53
Message-ID: 39AA87C9.C1282FD7@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Could copy be extended to support a more SQL-friendly syntax. like
> COPY tablename FROM VALUES(
> (x1,y1,z1),
> (x2,y2,z2),
> (x3,y3,z3)
> );
> Extending the COPY command would probably be much easier than speeding up
> INSERTS.

That syntax is a lot like a real SQL9x INSERT. Supporting multiple rows
for inserts is probably not that difficult; but since INSERT is used so
much we would have to make sure we don't screw up something else. At the
moment, expanding a line of SQL into multiple internal querytree nodes
is a bit crufty but is possible.

- Thomas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-08-28 15:51:50 Re: UNION JOIN vs UNION SELECT
Previous Message Brook Milligan 2000-08-28 15:26:13 Re: when does CREATE VIEW not create a view?