mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Some fine-tuning of xmlpi in corner cases:
- correct error codes - do syntax checks in correct order - strip leading spaces of argument
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.203 2007/01/05 22:19:27 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.204 2007/01/07 22:49:55 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2803,15 +2803,17 @@ ExecEvalXml(XmlExprState *xmlExpr, ExprContext *econtext,
|
||||
e = (ExprState *) linitial(xmlExpr->args);
|
||||
value = ExecEvalExpr(e, econtext, &isnull, NULL);
|
||||
if (isnull)
|
||||
return (Datum) 0;
|
||||
arg = DatumGetTextP(value);
|
||||
arg = NULL;
|
||||
else
|
||||
arg = DatumGetTextP(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
arg = NULL;
|
||||
isnull = false;
|
||||
}
|
||||
|
||||
*isNull = false;
|
||||
|
||||
return PointerGetDatum(xmlpi(xexpr->name, arg));
|
||||
return PointerGetDatum(xmlpi(xexpr->name, arg, isnull, isNull));
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user