Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbab4269

Browse files
author
Neil Conway
committed
contrib/xml2 updates from John Gray:
I have changed the name of the new parse function to xml_valid and fixeda reference to SortMem which meant that the code as supplied would workagainst 7.3 and 7.4 but wouldn't work in CVS.
1 parent9e5a091 commitbab4269

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

‎contrib/xml2/README.pgxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Description of functions
2727

2828
The first set of functions are straightforward XML parsing and XPath queries:
2929

30-
pgxml_parse(document) RETURNS bool
30+
xml_valid(document) RETURNS bool
3131

3232
This parses the document text in its parameter and returns true if the
3333
document is well-formed XML.

‎contrib/xml2/pgxml.sql.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--SQL for XML parser
22

3-
CREATE OR REPLACE FUNCTIONpgxml_parse(text) RETURNS bool
3+
CREATE OR REPLACE FUNCTIONxml_valid(text) RETURNS bool
44
AS 'MODULE_PATHNAME' LANGUAGE 'c' WITH (isStrict);
55

66
CREATE OR REPLACE FUNCTION xpath_string(text,text) RETURNS text

‎contrib/xml2/xpath.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ xmlChar *pgxml_texttoxmlchar(text *textstring);
3939
staticxmlXPathObjectPtrpgxml_xpath(text*document,xmlChar*xpath);
4040

4141

42-
Datumpgxml_parse(PG_FUNCTION_ARGS);
42+
Datumxml_valid(PG_FUNCTION_ARGS);
4343
Datumxpath_nodeset(PG_FUNCTION_ARGS);
4444
Datumxpath_string(PG_FUNCTION_ARGS);
4545
Datumxpath_number(PG_FUNCTION_ARGS);
@@ -162,12 +162,12 @@ pgxml_parser_init()
162162

163163
/* Returns true if document is well-formed */
164164

165-
PG_FUNCTION_INFO_V1(pgxml_parse);
165+
PG_FUNCTION_INFO_V1(xml_valid);
166166

167167
Datum
168-
pgxml_parse(PG_FUNCTION_ARGS)
168+
xml_valid(PG_FUNCTION_ARGS)
169169
{
170-
/* called aspgxml_parse(document) */
170+
/* called asxml_valid(document) */
171171
xmlDocPtrdoctree;
172172
text*t=PG_GETARG_TEXT_P(0);/* document buffer */
173173
int32docsize=VARSIZE(t)-VARHDRSZ;
@@ -646,11 +646,11 @@ Datum xpath_table(PG_FUNCTION_ARGS)
646646
per_query_ctx=rsinfo->econtext->ecxt_per_query_memory;
647647
oldcontext=MemoryContextSwitchTo(per_query_ctx);
648648

649-
/* Create the tuplestore -SortMem is the max in-memory size beforeit is
650-
*shipped to adiskheap file. Just like ... SortMem!
649+
/* Create the tuplestore -work_mem is the max in-memory size beforea
650+
*file is created ondiskto hold it.
651651
*/
652652

653-
tupstore=tuplestore_begin_heap(true, false,SortMem);
653+
tupstore=tuplestore_begin_heap(true, false,work_mem);
654654

655655
MemoryContextSwitchTo(oldcontext);
656656

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp