From: Tom Lane on
I wrote:
> If you're lost about the point here, it's this: an ArrayExpr can
> represent the result of an array assignment. For example, given
> UPDATE foo SET a[42] = x, what is generated is an ArrayExpr
> with refexpr = a, refupperindexpr = 42, refassgnexpr = x.
> On execution that generates the updated array value that needs to
> get stored back into the "a" column. How would you like to print
> that in EXPLAIN? Same deal for FieldStore: it can represent generating
> the new value of a composite column after replacing one field.

After thinking about this for awhile, the best representation I can
come up with is to let the EXPLAIN output look like an UPDATE
assignment. That is, from something like

UPDATE foo SET arraycol[42] = x WHERE ...

an EXPLAIN VERBOSE would include this in the targetlist display:

Output: ... , arraycol[42] = x , ...

An alternative possibility is to strip the indirection node(s) and
just show "x"; but that seems to leave a good deal of information
hidden, especially if the subscript expressions are complicated.

Objections, better ideas?

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Tom Lane on
Andrew Dunstan <andrew(a)dunslane.net> writes:
> With the following settings

> custom_variable_classes = 'auto_explain'
> auto_explain.log_min_duration = 0
> auto_explain.log_format = 'xml'
> auto_explain.log_analyze = on
> auto_explain.log_verbose = on
> shared_preload_libraries = 'auto_explain'

> I am getting regression failures on the rowtypes, transactions and
> arrays tests.

This seems to be fixed now in HEAD. Somebody should try 8.4 as well.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Andrew Dunstan on


Tom Lane wrote:
> Andrew Dunstan <andrew(a)dunslane.net> writes:
>
>> With the following settings
>>
>
>
>> custom_variable_classes = 'auto_explain'
>> auto_explain.log_min_duration = 0
>> auto_explain.log_format = 'xml'
>> auto_explain.log_analyze = on
>> auto_explain.log_verbose = on
>> shared_preload_libraries = 'auto_explain'
>>
>
>
>> I am getting regression failures on the rowtypes, transactions and
>> arrays tests.
>>
>
> This seems to be fixed now in HEAD. Somebody should try 8.4 as well.
>
>
>

Done. All is good now. Thanks.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers