We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent2abf130 commitbfce56eCopy full SHA for bfce56e
src/backend/executor/nodeLimit.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/executor/nodeLimit.c,v 1.33 2008/01/01 19:45:49 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeLimit.c,v 1.34 2008/03/10 03:37:59 tgl Exp $
12
13
*-------------------------------------------------------------------------
14
*/
@@ -246,7 +246,9 @@ recompute_limits(LimitState *node)
246
{
247
node->offset=DatumGetInt64(val);
248
if (node->offset<0)
249
-node->offset=0;
+ereport(ERROR,
250
+(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
251
+errmsg("OFFSET must not be negative")));
252
}
253
254
else
@@ -271,7 +273,9 @@ recompute_limits(LimitState *node)
271
273
272
274
node->count=DatumGetInt64(val);
275
if (node->count<0)
-node->count=0;
276
277
278
+errmsg("LIMIT must not be negative")));
279
node->noCount= false;
280
281