aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/postgres_fdw')
-rw-r--r--contrib/postgres_fdw/deparse.c2
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 129bdb549ff..c5149a071da 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -1350,7 +1350,7 @@ deparseExplicitTargetList(List *tlist, List **retrieved_attrs,
foreach(lc, tlist)
{
- TargetEntry *tle = castNode(TargetEntry, lfirst(lc));
+ TargetEntry *tle = lfirst_node(TargetEntry, lc);
if (i > 0)
appendStringInfoString(buf, ", ");
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 2851869932d..6670df5c6e9 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -1169,7 +1169,7 @@ postgresGetForeignPlan(PlannerInfo *root,
*/
foreach(lc, scan_clauses)
{
- RestrictInfo *rinfo = castNode(RestrictInfo, lfirst(lc));
+ RestrictInfo *rinfo = lfirst_node(RestrictInfo, lc);
/* Ignore any pseudoconstants, they're dealt with elsewhere */
if (rinfo->pseudoconstant)
@@ -5022,8 +5022,8 @@ conversion_error_callback(void *arg)
EState *estate = fsstate->ss.ps.state;
TargetEntry *tle;
- tle = castNode(TargetEntry, list_nth(fsplan->fdw_scan_tlist,
- errpos->cur_attno - 1));
+ tle = list_nth_node(TargetEntry, fsplan->fdw_scan_tlist,
+ errpos->cur_attno - 1);
/*
* Target list can have Vars and expressions. For Vars, we can get