Simon Riggs wrote: > On Sun, 2005-11-27 at 17:45 -0500, Tom Lane wrote: > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > COPY FROM can read in sufficient rows until it has a whole block worth > > > of data, then get a new block and write it all with one pair of > > > BufferLock calls. > > > > > Comments? > > > > I don't see any way to do this without horrible modularity violations. > > The COPY code has no business going anywhere near individual buffers; > > for that matter, it doesn't even really know what "a block worth" of > > data is, since the tuples it's dealing with aren't toasted yet. > > I've taken on board your comments about modularity issues from earlier. > [I've not included anything on unique indexes, notice]
I don't see why couldn't have an additional index access method entry point to insert multiple rows on one call. For an unique index, we could return an array of entries that violated the condition (if we were to implement such a feature for single-entry insertion.) -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster