Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3bb248ac
Commit
3bb248ac
authored
22 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Guard against stopping when numberTuples=0 and counter wraps around.
parent
b56af498
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/executor/execMain.c
+5
-4
5 additions, 4 deletions
src/backend/executor/execMain.c
with
5 additions
and
4 deletions
src/backend/executor/execMain.c
+
5
−
4
View file @
3bb248ac
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.19
5
200
2/12/18 00:14:47
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.19
6
200
3/01/08 23:32:29
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -166,7 +166,7 @@ ExecutorStart(QueryDesc *queryDesc)
...
@@ -166,7 +166,7 @@ ExecutorStart(QueryDesc *queryDesc)
* except to start up/shut down the destination. Otherwise,
* except to start up/shut down the destination. Otherwise,
* we retrieve up to 'count' tuples in the specified direction.
* we retrieve up to 'count' tuples in the specified direction.
*
*
* Note: count = 0 is interpreted as no portal limit,
e.g.
run to
* Note: count = 0 is interpreted as no portal limit,
i.e.,
run to
* completion.
* completion.
*
*
* ----------------------------------------------------------------
* ----------------------------------------------------------------
...
@@ -846,6 +846,7 @@ ExecEndPlan(PlanState *planstate, EState *estate)
...
@@ -846,6 +846,7 @@ ExecEndPlan(PlanState *planstate, EState *estate)
*
*
* processes the query plan to retrieve 'numberTuples' tuples in the
* processes the query plan to retrieve 'numberTuples' tuples in the
* direction specified.
* direction specified.
*
* Retrieves all tuples if numberTuples is 0
* Retrieves all tuples if numberTuples is 0
*
*
* result is either a slot containing the last tuple in the case
* result is either a slot containing the last tuple in the case
...
@@ -1091,10 +1092,10 @@ lnext: ;
...
@@ -1091,10 +1092,10 @@ lnext: ;
/*
/*
* check our tuple count.. if we've processed the proper number
* check our tuple count.. if we've processed the proper number
* then quit, else loop again and process more tuples. Zero
* then quit, else loop again and process more tuples. Zero
* number
_t
uples means no limit.
* number
T
uples means no limit.
*/
*/
current_tuple_count
++
;
current_tuple_count
++
;
if
(
numberTuples
==
current_tuple_count
)
if
(
numberTuples
&&
numberTuples
==
current_tuple_count
)
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment