Hi Prashant,

> One small coverage note: the new test covers the pretty, named-AS
> form. The DEFAULT form and the non-pretty output are exercised by
> my testing above but are not in the patch's tests; a DEFAULT line
> in the new test would be a nice addition, but I do not consider it
> a blocker.

v2, attached, adds a DEFAULT namespace to the view in the test:

    XMLNAMESPACES(('http://x.y' COLLATE "C") AS p,
                  DEFAULT ('http://x.z' COLLATE "C"))

so the expected output now shows both URIs printed bare before the
fix and in parentheses after it:

  before:
    XMLNAMESPACES ('http://x.y'::text COLLATE "C" AS p,
                   DEFAULT 'http://x.z'::text COLLATE "C")
  after:
    XMLNAMESPACES (('http://x.y'::text COLLATE "C") AS p,
                   DEFAULT ('http://x.z'::text COLLATE "C"))

The code in 0002 is unchanged from v1.  The DEFAULT branch already
got the parentheses there; the test now checks it.

I did not add the non-pretty output.  It reads back even before the
fix, so it would not catch this problem coming back.

Regards,
Henson

Attachment: v2-0001-Add-a-test-for-a-COLLATE-clause-in-the-URI-of-XML.patch
Description: Binary data

Attachment: v2-0002-Parenthesize-the-URI-of-XMLNAMESPACES-unless-it-i.patch
Description: Binary data

Reply via email to