Re: patch: function xmltable

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: function xmltable
Date: 2016-11-25 06:44:12
Message-ID: CAFj8pRBNoVu2UjHzn0QaZOLOkC08aPH0BP5-5prmi+uWZp=CcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-11-25 3:31 GMT+01:00 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:

> Michael Paquier wrote:
>
> > Nit: I did not look at the patch in details,
> > but I find the size of the latest version sent, 167kB, scary as it
> > complicates review and increases the likeliness of bugs.
>
> Here's the stat. Note that removing the functionality as discussed
> would remove all of xpath_parser.c but I think the rest of it remains
> pretty much unchanged. So it's clearly a large patch, but there are
> large docs and tests too, not just code.
>

yes, lot of is regress tests (expected part is 3x) - and XMLTABLE function
is not trivial.

lot of code is mechanical - nodes related. The really complex part is only
in xml.c. There is one longer function only - the complexity is based on
mapping libxml2 result to PostgreSQL result (with catching exceptions due
releasing libxml2 sources).

The all changes are well isolated - there is less risk to break some other.

>
> doc/src/sgml/func.sgml | 376 ++++++++++++++++++---
> src/backend/executor/execQual.c | 335 +++++++++++++++++++
> src/backend/executor/execTuples.c | 42 +++
> src/backend/nodes/copyfuncs.c | 66 ++++
> src/backend/nodes/equalfuncs.c | 51 +++
> src/backend/nodes/nodeFuncs.c | 100 ++++++
> src/backend/nodes/outfuncs.c | 51 +++
> src/backend/nodes/readfuncs.c | 42 +++
> src/backend/optimizer/util/clauses.c | 33 ++
> src/backend/parser/gram.y | 181 ++++++++++-
> src/backend/parser/parse_coerce.c | 33 +-
> src/backend/parser/parse_expr.c | 182 +++++++++++
> src/backend/parser/parse_target.c | 7 +
> src/backend/utils/adt/Makefile | 2 +-
> src/backend/utils/adt/ruleutils.c | 100 ++++++
> src/backend/utils/adt/xml.c | 610 ++++++++++++++++++++++++++++++
> +++++
> src/backend/utils/adt/xpath_parser.c | 337 +++++++++++++++++++
> src/backend/utils/fmgr/funcapi.c | 13 +
> src/include/executor/executor.h | 1 +
> src/include/executor/tableexpr.h | 69 ++++
> src/include/funcapi.h | 1 -
> src/include/nodes/execnodes.h | 31 ++
> src/include/nodes/nodes.h | 4 +
> src/include/nodes/parsenodes.h | 21 ++
> src/include/nodes/primnodes.h | 40 +++
> src/include/parser/kwlist.h | 3 +
> src/include/parser/parse_coerce.h | 4 +
> src/include/utils/xml.h | 2 +
> src/include/utils/xpath_parser.h | 24 ++
> src/test/regress/expected/xml.out | 415 ++++++++++++++++++++++++
> src/test/regress/expected/xml_1.out | 323 +++++++++++++++++++
> src/test/regress/expected/xml_2.out | 414 ++++++++++++++++++++++++
> src/test/regress/sql/xml.sql | 170 ++++++++++
> 33 files changed, 4019 insertions(+), 64 deletions(-)
>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-11-25 06:46:09 Re: patch: function xmltable
Previous Message Andreas Karlsson 2016-11-25 06:33:36 Re: Broken SSL tests in master