Re: [PATCH] Add CANONICAL option to xmlserialize - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Add CANONICAL option to xmlserialize
Date
Msg-id 3491170.1725990216@sss.pgh.pa.us
Whole thread Raw
In response to [PoC] Add CANONICAL option to xmlserialize  (Jim Jones <jim.jones@uni-muenster.de>)
List pgsql-hackers
Jim Jones <jim.jones@uni-muenster.de> writes:
> This patch introduces the CANONICAL option to xmlserialize, which
> serializes xml documents in their canonical form - as described in
> the W3C Canonical XML Version 1.1 specification. This option can
> be used with the additional parameter WITH [NO] COMMENTS to keep
> or remove xml comments from the canonical xml output.

While I don't object to providing this functionality in some form,
I think that doing it with this specific syntax is a seriously
bad idea.  I think there's significant risk that at some point
the SQL committee will either standardize this syntax with a
somewhat different meaning or standardize some other syntax for
the same functionality.

How about instead introducing a plain function along the lines of
"xml_canonicalize(xml, bool keep_comments) returns text" ?  The SQL
committee will certainly never do that, but we won't regret having
created a plain function whenever they get around to doing something
in the same space.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Refactoring postmaster's code to cleanup after child exit
Next
From: Andres Freund
Date:
Subject: Re: Refactoring postmaster's code to cleanup after child exit