From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Using results from INSERT ... RETURNING |
Date: | 2009-10-08 19:30:50 |
Message-ID: | 6827.1255030250@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane escribi:
> Does it affect how is it going to look in EXPLAIN output?
Hmm, I suppose there's not any law that says EXPLAIN has to print the
same name we use internally. The explain output could say "Insert",
"Update", or "Delete" independently of what we call the node type.
That would take away about 50% of my objection to the node name,
though on balance I still think "Dml" is a poor choice since plan
node names are typically verbs.
One issue is whether it would be confusing for implementors if the
explain output is completely unrelated to the internal name. We could
do something like "InsertTable" or "ModifyTable Insert", but both of
these look a bit ugly from a user's standpoint I think.
I notice also that the patch has chosen to represent Dml in XML/JSON
explain output as Node Type = Dml with an entirely new attribute
Operation to indicate Insert/Update/Delete. Do we really want to
go there? Adding single-purpose attributes doesn't seem like a great
idea.
While we're discussing explain output ... what about triggers?
An important aspect of this change is that at least the row-level
triggers are now going to be charged as runtime of the
Dml-or-whatever-we-call-it node. Should we rearrange the explain
output so that the printout for trigger runtimes is associated
with those nodes too? If so, what about statement-level triggers?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2009-10-08 19:34:22 | Re: Writeable CTEs and side effects |
Previous Message | Dimitri Fontaine | 2009-10-08 19:26:51 | Re: Concurrency testing |