#include "pgxc/nodemgr.h"
#include "pgxc/pgxc.h"
#include "pgxc/pgxcnode.h"
-#include "pgxc/postgresql_fdw.h"
#endif
#include "pgxc/remotecopy.h"
#include "nodes/nodes.h"
#include "pgxc/poolmgr.h"
-#include "pgxc/postgresql_fdw.h"
#include "catalog/pgxc_node.h"
#endif
#include "nodes/makefuncs.h"
+#include "optimizer/pgxcship.h"
#include "rewrite/rewriteHandler.h"
#include "storage/fd.h"
#include "tcop/tcopprot.h"
#include "access/gtm.h"
#include "parser/parse_coerce.h"
#include "pgxc/pgxc.h"
+#include "pgxc/pgxcnode.h"
#include "pgxc/planner.h"
-#include "pgxc/postgresql_fdw.h"
#include "access/sysattr.h"
#include "utils/builtins.h"
#include "utils/rel.h"
#include "miscadmin.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
+#include "optimizer/pgxcship.h"
#include "optimizer/planner.h"
#include "pgxc/pgxcnode.h"
-#include "pgxc/postgresql_fdw.h"
#include "pgxc/remotecopy.h"
#include "rewrite/rewriteHandler.h"
#include "utils/builtins.h"
#include "pgxc/locator.h"
#include "pgxc/nodemgr.h"
#include "pgxc/planner.h"
-#include "pgxc/postgresql_fdw.h"
#include "tcop/pquery.h"
#include "utils/acl.h"
#include "utils/builtins.h"
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
-OBJS = pgxcnode.o execRemote.o poolmgr.o poolcomm.o postgresql_fdw.o poolutils.o
+OBJS = pgxcnode.o execRemote.o poolmgr.o poolcomm.o poolutils.o
include $(top_srcdir)/src/backend/common.mk
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * postgresql_fdw.c
- * foreign-data wrapper for PostgreSQL
- *
- * Portions Copyright (c) 2012-2014, TransLattice, Inc.
- * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- * $PostgreSQL$
- *
- *-------------------------------------------------------------------------
- */
-#include "pgxc/postgresql_fdw.h"
-#include "catalog/pg_operator.h"
-#include "catalog/pg_proc.h"
-#include "catalog/pg_type.h"
-#include "funcapi.h"
-#include "mb/pg_wchar.h"
-#include "miscadmin.h"
-#include "nodes/nodeFuncs.h"
-#include "nodes/makefuncs.h"
-#include "optimizer/clauses.h"
-#include "optimizer/planmain.h"
-#include "parser/scansup.h"
-#include "utils/builtins.h"
-#include "utils/lsyscache.h"
-#include "utils/memutils.h"
-#include "utils/rel.h"
-#include "utils/syscache.h"
-
-#define DEBUG_FDW
-
-/*
- * Check whether the function is IMMUTABLE.
- */
-bool
-is_immutable_func(Oid funcid)
-{
- HeapTuple tp;
- bool isnull;
- Datum datum;
-
- tp = SearchSysCache(PROCOID, ObjectIdGetDatum(funcid), 0, 0, 0);
- if (!HeapTupleIsValid(tp))
- elog(ERROR, "cache lookup failed for function %u", funcid);
-
-#ifdef DEBUG_FDW
- /* print function name and its immutability */
- {
- char *proname;
- datum = SysCacheGetAttr(PROCOID, tp, Anum_pg_proc_proname, &isnull);
- proname = pstrdup(DatumGetName(datum)->data);
- elog(DEBUG1, "func %s(%u) is%s immutable", proname, funcid,
- (DatumGetChar(datum) == PROVOLATILE_IMMUTABLE) ? "" : " not");
- pfree(proname);
- }
-#endif
-
- datum = SysCacheGetAttr(PROCOID, tp, Anum_pg_proc_provolatile, &isnull);
- ReleaseSysCache(tp);
-
- return (DatumGetChar(datum) == PROVOLATILE_IMMUTABLE);
-}
-
#include "pgxc/locator.h"
#include "pgxc/nodemgr.h"
#include "pgxc/pgxc.h"
-#include "pgxc/postgresql_fdw.h"
#include "nodes/nodes.h"
#include "optimizer/planner.h"
#include "optimizer/var.h"
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * postgresql_fdw.h
- *
- * foreign-data wrapper for PostgreSQL
- *
- * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
- * Portions Copyright (c) 2010-2012, Postgres-XC Development Group
- *
- * src/include/pgxc/postgresql_fdw.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef POSTGRES_FDW_H
-#define POSTGRES_FDW_H
-
-#include "postgres.h"
-#include "pgxc/execRemote.h"
-
-bool is_immutable_func(Oid funcid);
-bool pgxc_is_expr_shippable(Expr *node, bool *has_aggs);
-#endif