diff options
Diffstat (limited to 'src/backend/executor/nodeLimit.c')
-rw-r--r-- | src/backend/executor/nodeLimit.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/backend/executor/nodeLimit.c b/src/backend/executor/nodeLimit.c index c7bc666c2f9..9e0cef44ab1 100644 --- a/src/backend/executor/nodeLimit.c +++ b/src/backend/executor/nodeLimit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeLimit.c,v 1.1 2000/10/26 21:35:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeLimit.c,v 1.2 2000/11/05 00:15:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -188,17 +188,11 @@ recompute_limits(Limit *node) econtext, &isNull, NULL)); - /* Interpret NULL count as no count */ + /* Interpret NULL count as no count (LIMIT ALL) */ if (isNull) limitstate->noCount = true; - else - { - /* Currently, LIMIT 0 is specified as meaning no limit. - * I think this is pretty bogus, but ... - */ - if (limitstate->count <= 0) - limitstate->noCount = true; - } + else if (limitstate->count < 0) + limitstate->count = 0; } else { |