Howdy,

I saw that Tom added the ModifyTable node to EXPLAIN output last week. I'd like to update my explanation extension to use it, but I've no idea what it would look like. Could someone send me an example in the XML format?

Thanks!

David

Search Discussions

  • Tom Lane at Mar 8, 2011 at 12:41 am

    "David E. Wheeler" <david@kineticode.com> writes:
    I saw that Tom added the ModifyTable node to EXPLAIN output last week. I'd like to update my explanation extension to use it, but I've no idea what it would look like. Could someone send me an example in the XML format?
    It's already there in 9.0 --- I just added the relation-name property.
    But since you ask:

    regression=# explain (format xml) update int8_tbl set q1 = q1+1;
    QUERY PLAN
    -------------------------------------------------------------
    <explain xmlns="http://www.postgresql.org/2009/explain"> +
    <Query> +
    <Plan> +
    <Node-Type>ModifyTable</Node-Type> +
    <Operation>Update</Operation> +
    <Relation-Name>int8_tbl</Relation-Name> +
    <Alias>int8_tbl</Alias> +
    <Startup-Cost>0.00</Startup-Cost> +
    <Total-Cost>1.06</Total-Cost> +
    <Plan-Rows>5</Plan-Rows> +
    <Plan-Width>22</Plan-Width> +
    <Plans> +
    <Plan> +
    <Node-Type>Seq Scan</Node-Type> +
    <Parent-Relationship>Member</Parent-Relationship>+
    <Relation-Name>int8_tbl</Relation-Name> +
    <Alias>int8_tbl</Alias> +
    <Startup-Cost>0.00</Startup-Cost> +
    <Total-Cost>1.06</Total-Cost> +
    <Plan-Rows>5</Plan-Rows> +
    <Plan-Width>22</Plan-Width> +
    </Plan> +
    </Plans> +
    </Plan> +
    </Query> +
    </explain>
    (1 row)


    regards, tom lane
  • David E. Wheeler at Mar 8, 2011 at 12:44 am

    On Mar 7, 2011, at 4:41 PM, Tom Lane wrote:

    "David E. Wheeler" <david@kineticode.com> writes:
    I saw that Tom added the ModifyTable node to EXPLAIN output last week. I'd like to update my explanation extension to use it, but I've no idea what it would look like. Could someone send me an example in the XML format?
    It's already there in 9.0 --- I just added the relation-name property.
    But since you ask:

    regression=# explain (format xml) update int8_tbl set q1 = q1+1;
    QUERY PLAN
    -------------------------------------------------------------
    <explain xmlns="http://www.postgresql.org/2009/explain"> +
    <Query> +
    <Plan> +
    <Node-Type>ModifyTable</Node-Type> +
    <Operation>Update</Operation> +
    Oh, just new values for the Node-Type and Operation elements. That's okay, then. I thought it was a new <ModifyTable> element. Great, nothing for me to change.

    And thanks for sending this to me, much appreciated.

    Best,

    David

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedMar 7, '11 at 9:51p
activeMar 8, '11 at 12:44a
posts3
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

David E. Wheeler: 2 posts Tom Lane: 1 post

People

Translate

site design / logo © 2021 Grokbase