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
d0cd7bda
Commit
d0cd7bda
authored
Feb 04, 2016
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postgres_fdw: pgindent run.
In preparation for upcoming commits.
parent
37c84570
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/postgres_fdw.c
+15
-14
No files found.
contrib/postgres_fdw/postgres_fdw.c
View file @
d0cd7bda
...
...
@@ -394,7 +394,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
fpinfo
->
shippable_extensions
=
ExtractExtensionList
(
defGetString
(
def
),
false
);
else
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
}
foreach
(
lc
,
fpinfo
->
table
->
options
)
{
...
...
@@ -403,7 +403,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
if
(
strcmp
(
def
->
defname
,
"use_remote_estimate"
)
==
0
)
fpinfo
->
use_remote_estimate
=
defGetBoolean
(
def
);
else
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
}
/*
...
...
@@ -530,8 +530,8 @@ get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel)
Relids
relids
;
/*
* First, consider whether any active EC is potentially useful for a
*
merge
join against this relation.
* First, consider whether any active EC is potentially useful for a
merge
* join against this relation.
*/
if
(
rel
->
has_eclass_joins
)
{
...
...
@@ -646,13 +646,13 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel)
}
/*
* Even if we're not using remote estimates, having the remote side do
*
the sort generally won't be any worse than doing it locally, and i
t
*
might be much better if the remote side can generate data in the right
*
order without needing a sort at all. However, what we're going to do
*
next is try to generate pathkeys that seem promising for possible merge
*
joins, and that's more speculative. A wrong choice might hurt quite a
* b
it, so b
ail out if we can't use remote estimates.
* Even if we're not using remote estimates, having the remote side do
the
*
sort generally won't be any worse than doing it locally, and it migh
t
*
be much better if the remote side can generate data in the right order
*
without needing a sort at all. However, what we're going to do next is
*
try to generate pathkeys that seem promising for possible merge joins,
*
and that's more speculative. A wrong choice might hurt quite a bit, so
* bail out if we can't use remote estimates.
*/
if
(
!
fpinfo
->
use_remote_estimate
)
return
useful_pathkeys_list
;
...
...
@@ -1006,6 +1006,7 @@ postgresGetForeignPlan(PlannerInfo *root,
deparseSelectStmtForRel
(
&
sql
,
root
,
baserel
,
remote_conds
,
best_path
->
path
.
pathkeys
,
&
retrieved_attrs
,
&
params_list
);
/*
* Build the fdw_private list that will be available to the executor.
* Items in the list must match enum FdwScanPrivateIndex, above.
...
...
@@ -1090,7 +1091,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
fsstate
->
retrieved_attrs
=
(
List
*
)
list_nth
(
fsplan
->
fdw_private
,
FdwScanPrivateRetrievedAttrs
);
fsstate
->
fetch_size
=
intVal
(
list_nth
(
fsplan
->
fdw_private
,
FdwScanPrivateFetchSize
));
FdwScanPrivateFetchSize
));
/* Create contexts for batches of tuples and per-tuple temp workspace. */
fsstate
->
batch_cxt
=
AllocSetContextCreate
(
estate
->
es_query_cxt
,
...
...
@@ -2640,7 +2641,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
{
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
break
;
}
}
...
...
@@ -2650,7 +2651,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
{
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
break
;
}
}
...
...
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