Re: Using multi-row technique with COPY

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Using multi-row technique with COPY
Дата
Msg-id 20051128112548.GB11375@surnet.cl
обсуждение исходный текст
Ответ на Re: Using multi-row technique with COPY  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Using multi-row technique with COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Simon Riggs wrote:
> On Sun, 2005-11-27 at 17:45 -0500, Tom Lane wrote:
> > Simon Riggs <simon@2ndquadrant.com> 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.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Using multi-row technique with COPY
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Using multi-row technique with COPY