mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2026-02-01 17:20:32 +00:00
parent
fc409ca842
commit
e5605e9292
@ -402,7 +402,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
xml_doc = xmlReadMemory(xml_ptr, xml_size, NULL, NULL, 0);
|
||||
if ( ! xml_doc )
|
||||
{
|
||||
xmlCleanupParser();
|
||||
pcwarn("unable to parse schema XML");
|
||||
return PC_FAILURE;
|
||||
}
|
||||
@ -417,7 +416,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
if( ! xpath_ctx )
|
||||
{
|
||||
xmlFreeDoc(xml_doc);
|
||||
xmlCleanupParser();
|
||||
pcwarn("unable to create new XPath context to read schema XML");
|
||||
return PC_FAILURE;
|
||||
}
|
||||
@ -432,7 +430,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
{
|
||||
xmlXPathFreeContext(xpath_ctx);
|
||||
xmlFreeDoc(xml_doc);
|
||||
xmlCleanupParser();
|
||||
pcwarn("unable to evaluate xpath expression \"%s\" against schema XML", xpath_str);
|
||||
return PC_FAILURE;
|
||||
}
|
||||
@ -512,7 +509,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
xmlXPathFreeObject(xpath_obj);
|
||||
xmlXPathFreeContext(xpath_ctx);
|
||||
xmlFreeDoc(xml_doc);
|
||||
xmlCleanupParser();
|
||||
pc_schema_free(s);
|
||||
pcwarn("schema dimension at position \"%d\" is declared twice", d->position + 1, ndims);
|
||||
return PC_FAILURE;
|
||||
@ -532,7 +528,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
xmlXPathFreeObject(xpath_obj);
|
||||
xmlXPathFreeContext(xpath_ctx);
|
||||
xmlFreeDoc(xml_doc);
|
||||
xmlCleanupParser();
|
||||
pc_schema_free(s);
|
||||
pcwarn("schema dimension states position \"%d\", but number of XML dimensions is \"%d\"", d->position + 1, ndims);
|
||||
return PC_FAILURE;
|
||||
@ -554,7 +549,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
{
|
||||
xmlXPathFreeContext(xpath_ctx);
|
||||
xmlFreeDoc(xml_doc);
|
||||
xmlCleanupParser();
|
||||
pcwarn("unable to evaluate xpath expression \"%s\" against schema XML", xpath_metadata_str);
|
||||
return PC_FAILURE;
|
||||
}
|
||||
@ -594,7 +588,6 @@ pc_schema_from_xml(const char *xml_str, PCSCHEMA **schema)
|
||||
|
||||
xmlXPathFreeContext(xpath_ctx);
|
||||
xmlFreeDoc(xml_doc);
|
||||
xmlCleanupParser();
|
||||
|
||||
return PC_SUCCESS;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ DATA_built = \
|
||||
$(EXTENSION)--$(EXTVERSION).sql \
|
||||
$(UPGRADES)
|
||||
|
||||
REGRESS = pointcloud pointcloud_columns
|
||||
REGRESS = pointcloud pointcloud_columns schema
|
||||
|
||||
ifneq ($(GHT_LDFLAGS),)
|
||||
REGRESS += pointcloud-ght
|
||||
|
||||
8
pgsql/expected/schema.out
Normal file
8
pgsql/expected/schema.out
Normal file
@ -0,0 +1,8 @@
|
||||
-- See https://github.com/pgpointcloud/pointcloud/issues/71
|
||||
select '#71', PC_SchemaIsValid('<xml/>'::xml::text);
|
||||
WARNING: unable to evaluate xpath expression "/pc:PointCloudSchema/pc:dimension" against schema XML
|
||||
?column? | pc_schemaisvalid
|
||||
----------+------------------
|
||||
#71 | f
|
||||
(1 row)
|
||||
|
||||
2
pgsql/sql/schema.sql
Normal file
2
pgsql/sql/schema.sql
Normal file
@ -0,0 +1,2 @@
|
||||
-- See https://github.com/pgpointcloud/pointcloud/issues/71
|
||||
select '#71', PC_SchemaIsValid('<xml/>'::xml::text);
|
||||
Loading…
x
Reference in New Issue
Block a user