xml_is_document and selective pg_re_throw

Поиск
Список
Период
Сортировка
От Nikhil Sontakke
Тема xml_is_document and selective pg_re_throw
Дата
Msg-id CANgU5ZcgN0dDFPCbm6TY9SZTfgCMGjL3RKqnEZALHQOWV-mVaA@mail.gmail.com
обсуждение исходный текст
Ответы Re: xml_is_document and selective pg_re_throw  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi, <br /><br />Consider:<br /><br />SELECT xml '<foo>bar</foo><bar>foo</bar>' IS DOCUMENT;<br
/><br/>And I was looking at xml_is_document() source code. It calls xml_parse which throws an error with code set to
ERRCODE_INVALID_XML_DOCUMENT.The catch block of xml_parse then rethrows. <br /><br />Now xml_is_document does a
selectiverethrow only if the error is not ERRCODE_INVALID_XML_DOCUMENT. I can understand that this function does this
toreturn true/false, but doesn't this behavior of not propagating the error up all the way dangerous?
InterruptHoldoffCountinconsistencies for instance? <br /><br />A better way would have been to modify xml_parse to take
anadditional boolean argument "to_rethrow" and not to rethrow if that is false? Thoughts? <br /><br />Regards,<br
/>Nikhils<br /> 

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: pg_basebackup --xlog compatibility break
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Skip checkpoint on promoting from streaming replication