mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Rename xml_valid() to xml_is_well_formed(), but provide a temporary
alias with the old name for backwards compatibility. Per discussion, the old name is actively wrong because validity and well-formedness have different meanings in XML.
This commit is contained in:
@ -42,7 +42,7 @@ xmlChar *pgxml_texttoxmlchar(text *textstring);
|
||||
static xmlXPathObjectPtr pgxml_xpath(text *document, xmlChar * xpath);
|
||||
|
||||
|
||||
Datum xml_valid(PG_FUNCTION_ARGS);
|
||||
Datum xml_is_well_formed(PG_FUNCTION_ARGS);
|
||||
Datum xml_encode_special_chars(PG_FUNCTION_ARGS);
|
||||
Datum xpath_nodeset(PG_FUNCTION_ARGS);
|
||||
Datum xpath_string(PG_FUNCTION_ARGS);
|
||||
@ -166,12 +166,12 @@ pgxml_parser_init()
|
||||
|
||||
/* Returns true if document is well-formed */
|
||||
|
||||
PG_FUNCTION_INFO_V1(xml_valid);
|
||||
PG_FUNCTION_INFO_V1(xml_is_well_formed);
|
||||
|
||||
Datum
|
||||
xml_valid(PG_FUNCTION_ARGS)
|
||||
xml_is_well_formed(PG_FUNCTION_ARGS)
|
||||
{
|
||||
/* called as xml_valid(document) */
|
||||
/* called as xml_is_well_formed(document) */
|
||||
xmlDocPtr doctree;
|
||||
text *t = PG_GETARG_TEXT_P(0); /* document buffer */
|
||||
int32 docsize = VARSIZE(t) - VARHDRSZ;
|
||||
|
Reference in New Issue
Block a user