Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8b357953
Commit
8b357953
authored
Jan 12, 2007
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use XML output escaping also in XMLFOREST.
parent
92dffbd0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
src/backend/executor/execQual.c
src/backend/executor/execQual.c
+4
-5
src/backend/utils/adt/xml.c
src/backend/utils/adt/xml.c
+2
-6
src/include/utils/xml.h
src/include/utils/xml.h
+2
-1
No files found.
src/backend/executor/execQual.c
View file @
8b357953
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.20
5 2007/01/10 20:33:54
petere Exp $
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.20
6 2007/01/12 21:47:26
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -2692,11 +2692,10 @@ ExecEvalXml(XmlExprState *xmlExpr, ExprContext *econtext,
value
=
ExecEvalExpr
(
e
,
econtext
,
&
isnull
,
NULL
);
if
(
!
isnull
)
{
str
=
OutputFunctionCall
(
&
xmlExpr
->
named_outfuncs
[
i
],
value
);
appendStringInfo
(
&
buf
,
"<%s>%s</%s>"
,
argname
,
str
,
argname
);
pfree
(
str
);
argname
,
map_sql_value_to_xml_value
(
value
,
exprType
((
Node
*
)
e
->
expr
)),
argname
);
*
isNull
=
false
;
}
i
++
;
...
...
src/backend/utils/adt/xml.c
View file @
8b357953
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.1
5 2007/01/12 16:29:24
petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.1
6 2007/01/12 21:47:26
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -70,8 +70,6 @@ static void xml_ereport_by_code(int level, int sqlcode,
static
xmlChar
*
xml_text2xmlChar
(
text
*
in
);
static
xmlDocPtr
xml_parse
(
text
*
data
,
bool
is_document
,
bool
preserve_whitespace
);
static
char
*
map_sql_value_to_xml_value
(
Datum
value
,
Oid
type
);
#endif
/* USE_LIBXML */
#define NO_XML_SUPPORT() \
...
...
@@ -1260,11 +1258,10 @@ map_xml_name_to_sql_identifier(char *name)
}
#ifdef USE_LIBXML
/*
* Map SQL value to XML value; see SQL/XML:2003 section 9.16.
*/
static
char
*
char
*
map_sql_value_to_xml_value
(
Datum
value
,
Oid
type
)
{
StringInfoData
buf
;
...
...
@@ -1341,4 +1338,3 @@ map_sql_value_to_xml_value(Datum value, Oid type)
return
buf
.
data
;
}
#endif
/* USE_LIBXML */
src/include/utils/xml.h
View file @
8b357953
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/xml.h,v 1.
8 2007/01/10 20:33:54
petere Exp $
* $PostgreSQL: pgsql/src/include/utils/xml.h,v 1.
9 2007/01/12 21:47:27
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -40,5 +40,6 @@ extern xmltype *xmlroot(xmltype *data, text *version, int standalone);
extern
char
*
map_sql_identifier_to_xml_name
(
char
*
ident
,
bool
fully_escaped
);
extern
char
*
map_xml_name_to_sql_identifier
(
char
*
name
);
extern
char
*
map_sql_value_to_xml_value
(
Datum
value
,
Oid
type
);
#endif
/* XML_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment