提交 1bc9e985 编写于 作者: T Tom Lane

SendFunctionResult should take care to detoast varlena results.

上级 9f1f2bfb
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.55 2003/01/01 21:57:05 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.56 2003/01/07 22:32:10 tgl Exp $
*
* NOTES
* This cruft is the server side of PQfn.
......@@ -97,7 +97,7 @@ SendFunctionResult(Datum retval, bool retbyval, int retlen)
{ /* by-reference ... */
if (retlen == -1)
{ /* ... varlena */
struct varlena *v = (struct varlena *) DatumGetPointer(retval);
struct varlena *v = PG_DETOAST_DATUM(retval);
pq_sendint(&buf, VARSIZE(v) - VARHDRSZ, VARHDRSZ);
pq_sendbytes(&buf, VARDATA(v), VARSIZE(v) - VARHDRSZ);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册