Re: Does XMLSERIALIZE output xmlattributes in a stable order?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Does XMLSERIALIZE output xmlattributes in a stable order?
Дата
Msg-id 6928.1511282951@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Does XMLSERIALIZE output xmlattributes in a stable order?  (Chapman Flack <chap@anastigmatix.net>)
Ответы Re: Does XMLSERIALIZE output xmlattributes in a stable order?
Список pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> Suppose I have a query that generates some XML content, and I want
> to do this on a periodic schedule and check the resulting XML into
> a version control system.
> ...
> But then, there are the attributes of elements. Order of attributes
> is not significant in XML, and is not required (by the "XML Infoset"
> standard) to be preserved. Nevertheless, it would be a useful
> property (for a purpose like I've described) if XMLSERIALIZE were
> known to at least produce the attributes in some consistent order
> across evaluations of the same query.

> Is that true of the implementation in PostgreSQL? I might find out
> with a quick test, but it seemed worth explicitly asking.

AFAICS, XMLSERIALIZE in our current implementation boils down to
being a binary-compatible coercion from XML (which is stored as
a string) to text.  So the interesting question here is where are
you getting the XML values from?  The stability of the results is
going to be whatever the next level down does.
        regards, tom lane


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Inlining functions with "expensive" parameters
Следующее
От: Tom Lane
Дата:
Сообщение: Re: View with duplicate GROUP BY entries