Re: auto_explain causes regression failures - Mailing list pgsql-hackers

From Tom Lane
Subject Re: auto_explain causes regression failures
Date
Msg-id 28389.1266463041@sss.pgh.pa.us
Whole thread Raw
In response to Re: auto_explain causes regression failures  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: NOTIFY/LISTEN on read-only slave?
Next
From: Tom Lane
Date:
Subject: Re: NOTIFY/LISTEN on read-only slave?