Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef POSTGRES_FDW_H
00014 #define POSTGRES_FDW_H
00015
00016 #include "foreign/foreign.h"
00017 #include "lib/stringinfo.h"
00018 #include "nodes/relation.h"
00019 #include "utils/rel.h"
00020
00021 #include "libpq-fe.h"
00022
00023
00024 extern int set_transmission_modes(void);
00025 extern void reset_transmission_modes(int nestlevel);
00026
00027
00028 extern PGconn *GetConnection(ForeignServer *server, UserMapping *user,
00029 bool will_prep_stmt);
00030 extern void ReleaseConnection(PGconn *conn);
00031 extern unsigned int GetCursorNumber(PGconn *conn);
00032 extern unsigned int GetPrepStmtNumber(PGconn *conn);
00033 extern void pgfdw_report_error(int elevel, PGresult *res, bool clear,
00034 const char *sql);
00035
00036
00037 extern int ExtractConnectionOptions(List *defelems,
00038 const char **keywords,
00039 const char **values);
00040
00041
00042 extern void classifyConditions(PlannerInfo *root,
00043 RelOptInfo *baserel,
00044 List **remote_conds,
00045 List **local_conds);
00046 extern bool is_foreign_expr(PlannerInfo *root,
00047 RelOptInfo *baserel,
00048 Expr *expr);
00049 extern void deparseSelectSql(StringInfo buf,
00050 PlannerInfo *root,
00051 RelOptInfo *baserel,
00052 Bitmapset *attrs_used,
00053 List **retrieved_attrs);
00054 extern void appendWhereClause(StringInfo buf,
00055 PlannerInfo *root,
00056 RelOptInfo *baserel,
00057 List *exprs,
00058 bool is_first,
00059 List **params);
00060 extern void deparseInsertSql(StringInfo buf, PlannerInfo *root,
00061 Index rtindex, Relation rel,
00062 List *targetAttrs, List *returningList,
00063 List **retrieved_attrs);
00064 extern void deparseUpdateSql(StringInfo buf, PlannerInfo *root,
00065 Index rtindex, Relation rel,
00066 List *targetAttrs, List *returningList,
00067 List **retrieved_attrs);
00068 extern void deparseDeleteSql(StringInfo buf, PlannerInfo *root,
00069 Index rtindex, Relation rel,
00070 List *returningList,
00071 List **retrieved_attrs);
00072 extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel);
00073 extern void deparseAnalyzeSql(StringInfo buf, Relation rel,
00074 List **retrieved_attrs);
00075
00076 #endif