Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
110ba08a
Commit
110ba08a
authored
Oct 27, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix binary cursors broken by MOVE implementation.
(Thanks to Bruce for finding what caused problem).
parent
f15eeff1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
src/backend/commands/command.c
src/backend/commands/command.c
+20
-9
No files found.
src/backend/commands/command.c
View file @
110ba08a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
19 1997/09/29 05:56:10
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
20 1997/10/27 08:55:16
vadim Exp $
*
*
* NOTES
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
* The PortalExecutorHeapMemory crap needs to be eliminated
...
@@ -97,10 +97,10 @@ PerformPortalFetch(char *name,
...
@@ -97,10 +97,10 @@ PerformPortalFetch(char *name,
char
*
tag
,
char
*
tag
,
CommandDest
dest
)
CommandDest
dest
)
{
{
Portal
portal
;
Portal
portal
;
int
feature
;
int
feature
;
QueryDesc
queryDesc
;
QueryDesc
*
queryDesc
;
MemoryContext
context
;
MemoryContext
context
;
/* ----------------
/* ----------------
* sanity checks
* sanity checks
...
@@ -147,11 +147,19 @@ PerformPortalFetch(char *name,
...
@@ -147,11 +147,19 @@ PerformPortalFetch(char *name,
* tell the destination to prepare to recieve some tuples
* tell the destination to prepare to recieve some tuples
* ----------------
* ----------------
*/
*/
memcpy
(
&
queryDesc
,
PortalGetQueryDesc
(
portal
),
sizeof
(
queryDesc
));
queryDesc
=
PortalGetQueryDesc
(
portal
);
queryDesc
.
dest
=
dest
;
if
(
dest
==
None
)
/* MOVE */
{
QueryDesc
*
qdesc
=
(
QueryDesc
*
)
palloc
(
sizeof
(
QueryDesc
));
memcpy
(
qdesc
,
queryDesc
,
sizeof
(
QueryDesc
));
qdesc
->
dest
=
dest
;
queryDesc
=
qdesc
;
}
BeginCommand
(
name
,
BeginCommand
(
name
,
queryDesc
.
operation
,
queryDesc
->
operation
,
portal
->
attinfo
,
/* QueryDescGetTypeInfo(queryDesc),
portal
->
attinfo
,
/* QueryDescGetTypeInfo(queryDesc),
* */
* */
false
,
/* portal fetches don't end up in
false
,
/* portal fetches don't end up in
...
@@ -168,8 +176,11 @@ PerformPortalFetch(char *name,
...
@@ -168,8 +176,11 @@ PerformPortalFetch(char *name,
PortalExecutorHeapMemory
=
(
MemoryContext
)
PortalExecutorHeapMemory
=
(
MemoryContext
)
PortalGetHeapMemory
(
portal
);
PortalGetHeapMemory
(
portal
);
ExecutorRun
(
&
queryDesc
,
PortalGetState
(
portal
),
feature
,
count
);
ExecutorRun
(
queryDesc
,
PortalGetState
(
portal
),
feature
,
count
);
if
(
dest
==
None
)
/* MOVE */
pfree
(
queryDesc
);
/* ----------------
/* ----------------
* Note: the "end-of-command" tag is returned by higher-level
* Note: the "end-of-command" tag is returned by higher-level
* utility code
* utility code
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment