Jim Jones <jim.jo...@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