mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Support writable foreign tables.
This patch adds the core-system infrastructure needed to support updates on foreign tables, and extends contrib/postgres_fdw to allow updates against remote Postgres servers. There's still a great deal of room for improvement in optimization of remote updates, but at least there's basic functionality there now. KaiGai Kohei, reviewed by Alexander Korotkov and Laurenz Albe, and rather heavily revised by Tom Lane.
This commit is contained in:
@ -21,9 +21,11 @@
|
||||
#include "libpq-fe.h"
|
||||
|
||||
/* in connection.c */
|
||||
extern PGconn *GetConnection(ForeignServer *server, UserMapping *user);
|
||||
extern PGconn *GetConnection(ForeignServer *server, UserMapping *user,
|
||||
bool will_prep_stmt);
|
||||
extern void ReleaseConnection(PGconn *conn);
|
||||
extern unsigned int GetCursorNumber(PGconn *conn);
|
||||
extern unsigned int GetPrepStmtNumber(PGconn *conn);
|
||||
extern void pgfdw_report_error(int elevel, PGresult *res, bool clear,
|
||||
const char *sql);
|
||||
|
||||
@ -39,14 +41,20 @@ extern void classifyConditions(PlannerInfo *root,
|
||||
List **param_conds,
|
||||
List **local_conds,
|
||||
List **param_numbers);
|
||||
extern void deparseSimpleSql(StringInfo buf,
|
||||
extern void deparseSelectSql(StringInfo buf,
|
||||
PlannerInfo *root,
|
||||
RelOptInfo *baserel,
|
||||
List *local_conds);
|
||||
Bitmapset *attrs_used);
|
||||
extern void appendWhereClause(StringInfo buf,
|
||||
bool has_where,
|
||||
PlannerInfo *root,
|
||||
List *exprs,
|
||||
PlannerInfo *root);
|
||||
bool is_first);
|
||||
extern void deparseInsertSql(StringInfo buf, PlannerInfo *root, Index rtindex,
|
||||
List *targetAttrs, List *returningList);
|
||||
extern void deparseUpdateSql(StringInfo buf, PlannerInfo *root, Index rtindex,
|
||||
List *targetAttrs, List *returningList);
|
||||
extern void deparseDeleteSql(StringInfo buf, PlannerInfo *root, Index rtindex,
|
||||
List *returningList);
|
||||
extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel);
|
||||
extern void deparseAnalyzeSql(StringInfo buf, Relation rel);
|
||||
|
||||
|
Reference in New Issue
Block a user