Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL
Дата
Msg-id 20131007140551.GE15202@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL
Список pgsql-hackers
On 2013-10-07 16:00:54 +0200, Pavel Stehule wrote:
>                  /*
>                   * We need to do subscript evaluation, which might require
> @@ -4321,6 +4322,14 @@ exec_assign_value(PLpgSQL_execstate *estate,
>                      oldarrayval = (ArrayType *) DatumGetPointer(oldarraydatum);
>  
>                  /*
> +                 * support fast update for array scalar variable is enabled only
> +                 * when target is a scalar variable and variable holds a local
> +                 * copy of some array.
> +                 */
> +                inplace_update = (((PLpgSQL_datum *) target)->dtype == PLPGSQL_DTYPE_VAR
> +                                && ((PLpgSQL_var *) target)->freeval);
> +
> +                /*
>                   * Build the modified array value.
>                   */

Will this recognize if the local Datum is just a reference to an
external toast Datum (i.e. varattrib_1b_e)?

I don't know much about plpgsql's implementation, so please excuse if
the question is stupid.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: SSI freezing bug