BUG #16277: xmlelement allows invalid XML characters when XML version is set to 1.0

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #16277: xmlelement allows invalid XML characters when XML version is set to 1.0
Дата
Msg-id 16277-efdbe9891408668e@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #16277: xmlelement allows invalid XML characters when XML version is set to 1.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16277
Logged by:          Andreas Lennartsson
Email address:      andreas@apkudo.com
PostgreSQL version: 10.7
Operating system:   Ubuntu
Description:

The following example:
SELECT
  xmlroot (
     xmlelement (name "test", CHR(26))
  , version '1.0'
  )

Produces xml with the invalid ASCII character 26.

The documentation states:
Element content, if specified, will be formatted according to its data type.
If the content is itself of type xml, complex XML documents can be
constructed.
Content of other types will be formatted into valid XML character data. This
means in particular that the characters <, >, and & will be converted to
entities. Binary data (data type bytea) will be represented in base64 or hex
encoding, depending on the setting of the configuration parameter xmlbinary.
The particular behavior for individual data types is expected to evolve in
order to align the SQL and PostgreSQL data types with the XML Schema
specification, at which point a more precise description will appear.


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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16276: Server crash on an invalid attempt to attach a partition to an index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16277: xmlelement allows invalid XML characters when XML version is set to 1.0