summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/xml2/xpath.c2
-rw-r--r--src/pl/plpgsql/src/pl_exec.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index 212cb74aa22..94bb31434c8 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -174,7 +174,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset,
xmlBufferWriteCHAR(buf, toptagname);
xmlBufferWriteChar(buf, ">");
}
- result = xmlStrdup(buf->content);
+ result = xmlStrdup(xmlBufferContent(buf));
xmlBufferFree(buf);
return result;
}
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 6469807a078..cff9c74e668 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -5703,7 +5703,7 @@ exec_eval_expr(PLpgSQL_execstate *estate,
/*
* Else do it the hard way via exec_run_select
*/
- rc = exec_run_select(estate, expr, 2, NULL);
+ rc = exec_run_select(estate, expr, 0, NULL);
if (rc != SPI_OK_SELECT)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
@@ -5757,6 +5757,10 @@ exec_eval_expr(PLpgSQL_execstate *estate,
/* ----------
* exec_run_select Execute a select query
+ *
+ * Note: passing maxtuples different from 0 ("return all tuples") is
+ * deprecated because it will prevent parallel execution of the query.
+ * However, we retain the parameter in case we need it someday.
* ----------
*/
static int