diff options
| author | Tom Lane | 2006-12-24 00:29:20 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-12-24 00:29:20 +0000 |
| commit | c957c0bac7f9785ae2a7520a9f693eeda0ff545b (patch) | |
| tree | 36d172e97e59d00d39fe1b76401b84f9a93b4e1b /src/pl | |
| parent | 64974613c98e9928af7bbccaeb718012b1dc6769 (diff) | |
Code review for XML patch. Instill a bit of sanity in the location of
the XmlExpr code in various lists, use a representation that has some hope
of reverse-listing correctly (though it's still a de-escaping function
shy of correctness), generally try to make it look more like Postgres
coding conventions.
Diffstat (limited to 'src/pl')
| -rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 14 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/plerrcodes.h | 18 |
2 files changed, 30 insertions, 2 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index c28c2c6c8f..bff8152061 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.180 2006/10/04 00:30:13 momjian Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.181 2006/12/24 00:29:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4493,6 +4493,18 @@ exec_simple_check_node(Node *node) return TRUE; } + case T_XmlExpr: + { + XmlExpr *expr = (XmlExpr *) node; + + if (!exec_simple_check_node((Node *) expr->named_args)) + return FALSE; + if (!exec_simple_check_node((Node *) expr->args)) + return FALSE; + + return TRUE; + } + case T_NullIfExpr: { NullIfExpr *expr = (NullIfExpr *) node; diff --git a/src/pl/plpgsql/src/plerrcodes.h b/src/pl/plpgsql/src/plerrcodes.h index 478bf3b080..ba0c229ccd 100644 --- a/src/pl/plpgsql/src/plerrcodes.h +++ b/src/pl/plpgsql/src/plerrcodes.h @@ -9,7 +9,7 @@ * * Copyright (c) 2003-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/pl/plpgsql/src/plerrcodes.h,v 1.9 2006/06/16 23:29:27 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/plerrcodes.h,v 1.10 2006/12/24 00:29:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -244,6 +244,22 @@ }, { + "invalid_xml_document", ERRCODE_INVALID_XML_DOCUMENT +}, + +{ + "invalid_xml_content", ERRCODE_INVALID_XML_CONTENT +}, + +{ + "invalid_xml_comment", ERRCODE_INVALID_XML_COMMENT +}, + +{ + "invalid_xml_processing_instruction", ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION +}, + +{ "integrity_constraint_violation", ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION }, |
