machine-readable explain output v2

Поиск
Список
Период
Сортировка
От Robert Haas
Тема machine-readable explain output v2
Дата
Msg-id 603c8f070906172043w6dba5b18x60e1cea76c44dba0@mail.gmail.com
обсуждение исходный текст
Ответы Re: machine-readable explain output v2  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
OK, here's the second version of my machine-readable explain output
patches.  Previous version here:

http://archives.postgresql.org/pgsql-hackers/2009-06/msg00867.php

To apply the current version, you will first need to apply
explain_refactor-v4.patch and explain_options-v3.patch.

http://archives.postgresql.org/pgsql-hackers/2009-06/msg00865.php
http://archives.postgresql.org/pgsql-hackers/2009-06/msg01094.php

As before, the infrastructure patch applies first and is separated
only for ease of reviewing.  Based on feedback from the list, and
especially from Peter Eisentraut, I've made a number of changes and
improvements since the previous version of the patch:

- The XML format now uses <explain xmlns="..."> rather than <pgexplain>.

- The JSON format no longer quotes numeric arguments.  I'm actually
not really that happy with this change; it seems likely that when
presented with an unquoted floating point number, most JSON parsers
will convert it to a native floating point value, throwing away the
information on how many significant digits were present in the
original.  I think we should rethink this one.  I don't know of a
programming language where there isn't an easy equivalent of
JavaScript's parseFloat() or C's atof().

- In XML or JSON formats, return the entire result as a single row,
rather than a series of rows that the caller is responsible for
concatenating.  Also, in XML format, return the result as type xml,
rather than type text.  If you want this to work even without
--with-libxml, you'll need to also apply do_tup_output_datum-v2.patch,
which you can find here:
http://archives.postgresql.org/pgsql-hackers/2009-06/msg00973.php

- Add a very simple regression test for EXPLAIN.

- Add documentation.

- Add a new GUC to contrib/auto_explain so that you can specify xml or
json output when using that module, as requested by Dave Page.

- Avoid using the "Trigger" tag to mean two different things; when
displaying trigger statistics, use "Trigger-Name" and
"Constraint-Name" instead of just "Trigger" and "Constraint", as
suggested by Andres Freund.  Along the way, fix a bug in the JSON
format where {} was being used in place of [].

- When VERBOSE is specified, schema-qualify all tables and functions
scanned and alias-qualify all variable names appearing within quals.

- I also changed the behavior with regard to displaying trigger and
constraint names.  Previously, the code displayed the trigger name
only if there was no constraint name.  Now, the XML and JSON formats
always display both, and the text format displays both if VERBOSE is
specified.

Hope you all like it.

Thanks,

...Robert

Вложения

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

Предыдущее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: machine-readable explain output
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Determining client_encoding from client locale