Re: Values list-of-targetlists patch for comments (was Re:

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Values list-of-targetlists patch for comments (was Re:
Дата
Msg-id 20060802185952.GD6019@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Values list-of-targetlists patch for comments (was Re:  (Joe Conway <mail@joeconway.com>)
Список pgsql-patches
Joe Conway wrote:

> What if we built an array of A_Const nodes instead of a List? Maybe we
> could use something akin to appendStringInfo()/enlargeStringInfo() to
> build the array of nodes and enlarge it in chunks.

In inval.c you find this:

/*
 * To minimize palloc traffic, we keep pending requests in successively-
 * larger chunks (a slightly more sophisticated version of an expansible
 * array).  All request types can be stored as SharedInvalidationMessage
 * records.  The ordering of requests within a list is never significant.
 */
typedef struct InvalidationChunk
{
    struct InvalidationChunk *next;     /* list link */
    int         nitems;         /* # items currently stored in chunk */
    int         maxitems;       /* size of allocated array in this chunk */
    SharedInvalidationMessage msgs[1];  /* VARIABLE LENGTH ARRAY */
} InvalidationChunk;            /* VARIABLE LENGTH STRUCTURE */

Which might give you an idea ...

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Values list-of-targetlists patch for comments (was Re:
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Values list-of-targetlists patch for comments (was Re: