aboutsummaryrefslogtreecommitdiff
path: root/contrib/xml2/xpath.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-03-07 20:41:27 +0000
committerNeil Conway <neilc@samurai.com>2004-03-07 20:41:27 +0000
commitbab4269b9560e81adfe70c61cd811b1b8813b91c (patch)
treebe0ce87f852fca6cd1573282ae41120cf8629554 /contrib/xml2/xpath.c
parent9e5a091f02324069f611373b6a3536f158503921 (diff)
downloadpostgresql-bab4269b9560e81adfe70c61cd811b1b8813b91c.tar.gz
postgresql-bab4269b9560e81adfe70c61cd811b1b8813b91c.zip
contrib/xml2 updates from John Gray:
I have changed the name of the new parse function to xml_valid and fixed a reference to SortMem which meant that the code as supplied would work against 7.3 and 7.4 but wouldn't work in CVS.
Diffstat (limited to 'contrib/xml2/xpath.c')
-rw-r--r--contrib/xml2/xpath.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index b4fc8287986..84792ca2484 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -39,7 +39,7 @@ xmlChar *pgxml_texttoxmlchar(text *textstring);
static xmlXPathObjectPtr pgxml_xpath(text *document, xmlChar* xpath);
-Datum pgxml_parse(PG_FUNCTION_ARGS);
+Datum xml_valid(PG_FUNCTION_ARGS);
Datum xpath_nodeset(PG_FUNCTION_ARGS);
Datum xpath_string(PG_FUNCTION_ARGS);
Datum xpath_number(PG_FUNCTION_ARGS);
@@ -162,12 +162,12 @@ pgxml_parser_init()
/* Returns true if document is well-formed */
-PG_FUNCTION_INFO_V1(pgxml_parse);
+PG_FUNCTION_INFO_V1(xml_valid);
Datum
-pgxml_parse(PG_FUNCTION_ARGS)
+xml_valid(PG_FUNCTION_ARGS)
{
- /* called as pgxml_parse(document) */
+ /* called as xml_valid(document) */
xmlDocPtr doctree;
text *t = PG_GETARG_TEXT_P(0); /* document buffer */
int32 docsize = VARSIZE(t) - VARHDRSZ;
@@ -646,11 +646,11 @@ Datum xpath_table(PG_FUNCTION_ARGS)
per_query_ctx = rsinfo->econtext->ecxt_per_query_memory;
oldcontext = MemoryContextSwitchTo(per_query_ctx);
-/* Create the tuplestore - SortMem is the max in-memory size before it is
- * shipped to a disk heap file. Just like ... SortMem!
+/* Create the tuplestore - work_mem is the max in-memory size before a
+ * file is created on disk to hold it.
*/
- tupstore = tuplestore_begin_heap(true, false, SortMem);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
MemoryContextSwitchTo(oldcontext);