On Fri, 2007-12-14 at 14:41 +0000, Simon Riggs wrote:
> On Thu, 2007-12-13 at 22:23 -0800, Neil Conway wrote:
> so here's a patch.
minor correction
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
Index: src/backend/executor/nodeLimit.c
===================================================================
RCS file: /home/sriggs/pg/REPOSITORY/pgsql/src/backend/executor/nodeLimit.c,v
retrieving revision 1.32
diff -c -r1.32 nodeLimit.c
*** src/backend/executor/nodeLimit.c 15 Nov 2007 21:14:34 -0000 1.32
--- src/backend/executor/nodeLimit.c 14 Dec 2007 14:34:22 -0000
***************
*** 246,252 ****
{
node->offset = DatumGetInt64(val);
if (node->offset < 0)
! node->offset = 0;
}
}
else
--- 246,254 ----
{
node->offset = DatumGetInt64(val);
if (node->offset < 0)
! ereport(ERROR,
! (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
! errmsg("OFFSET must not be negative")));
}
}
else
***************
*** 271,277 ****
{
node->count = DatumGetInt64(val);
if (node->count < 0)
! node->count = 0;
node->noCount = false;
}
}
--- 273,281 ----
{
node->count = DatumGetInt64(val);
if (node->count < 0)
! ereport(ERROR,
! (errcode(ERRCODE_INVALID_LIMIT_VALUE),
! errmsg("LIMIT must not be negative")));
node->noCount = false;
}
}
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend