pgsql: Provide some rather hokey ways for EXPLAIN to print FieldStore

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Provide some rather hokey ways for EXPLAIN to print FieldStore
Дата
Msg-id 20100218224339.A6BF27541C5@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Provide some rather hokey ways for EXPLAIN to print FieldStore and assignment
ArrayRef expressions that are not in the immediate context of an INSERT or
UPDATE targetlist.  Such cases never arise in stored rules, so ruleutils.c
hadn't tried to handle them.  However, they do occur in the targetlists of
plans derived from such statements, and now that EXPLAIN VERBOSE tries to
print targetlists, we need some way to deal with the case.

I chose to represent an assignment ArrayRef as "array[subscripts] := source",
which is fairly reasonable and doesn't omit any information.  However,
FieldStore is problematic because the planner will fold multiple assignments
to fields of the same composite column into one FieldStore, resulting in a
structure that is hard to understand at all, let alone display comprehensibly.
So in that case I punted and just made it print the source expression(s).

Backpatch to 8.4 --- the lack of functionality exists in older releases,
but doesn't seem to be important for lack of anything that would call it.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.300.2.1 -> r1.300.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.300.2.1&r2=1.300.2.2)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Provide some rather hokey ways for EXPLAIN to print FieldStore
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Volatile-ize all five places where we expect a PG_TRY block to