|
PostgreSQL Source Code git master
|
#include "foreign/foreign.h"#include "lib/stringinfo.h"#include "libpq/libpq-be-fe.h"#include "nodes/execnodes.h"#include "nodes/pathnodes.h"#include "utils/relcache.h"

Go to the source code of this file.
Data Structures | |
| struct | PgFdwRelationInfo |
| struct | PgFdwConnState |
Typedefs | |
| typedef struct PgFdwRelationInfo | PgFdwRelationInfo |
| typedef struct PgFdwConnState | PgFdwConnState |
| typedef enum PgFdwSamplingMethod | PgFdwSamplingMethod |
Enumerations | |
| enum | PgFdwSamplingMethod { ANALYZE_SAMPLE_OFF , ANALYZE_SAMPLE_AUTO , ANALYZE_SAMPLE_RANDOM , ANALYZE_SAMPLE_SYSTEM , ANALYZE_SAMPLE_BERNOULLI } |
Functions | |
| int | set_transmission_modes (void) |
| void | reset_transmission_modes (int nestlevel) |
| void | process_pending_request (AsyncRequest *areq) |
| PGconn * | GetConnection (UserMapping *user, bool will_prep_stmt, PgFdwConnState **state) |
| void | ReleaseConnection (PGconn *conn) |
| unsigned int | GetCursorNumber (PGconn *conn) |
| unsigned int | GetPrepStmtNumber (PGconn *conn) |
| void | do_sql_command (PGconn *conn, const char *sql) |
| PGresult * | pgfdw_get_result (PGconn *conn) |
| PGresult * | pgfdw_exec_query (PGconn *conn, const char *query, PgFdwConnState *state) |
| pg_noreturn void | pgfdw_report_error (PGresult *res, PGconn *conn, const char *sql) |
| void | pgfdw_report (int elevel, PGresult *res, PGconn *conn, const char *sql) |
| int | ExtractConnectionOptions (List *defelems, const char **keywords, const char **values) |
| List * | ExtractExtensionList (const char *extensionsString, bool warnOnMissing) |
| char * | process_pgfdw_appname (const char *appname) |
| void | classifyConditions (PlannerInfo *root, RelOptInfo *baserel, List *input_conds, List **remote_conds, List **local_conds) |
| bool | is_foreign_expr (PlannerInfo *root, RelOptInfo *baserel, Expr *expr) |
| bool | is_foreign_param (PlannerInfo *root, RelOptInfo *baserel, Expr *expr) |
| bool | is_foreign_pathkey (PlannerInfo *root, RelOptInfo *baserel, PathKey *pathkey) |
| void | deparseInsertSql (StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *targetAttrs, bool doNothing, List *withCheckOptionList, List *returningList, List **retrieved_attrs, int *values_end_len) |
| void | rebuildInsertSql (StringInfo buf, Relation rel, char *orig_query, List *target_attrs, int values_end_len, int num_params, int num_rows) |
| void | deparseUpdateSql (StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *targetAttrs, List *withCheckOptionList, List *returningList, List **retrieved_attrs) |
| void | deparseDirectUpdateSql (StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, RelOptInfo *foreignrel, List *targetlist, List *targetAttrs, List *remote_conds, List **params_list, List *returningList, List **retrieved_attrs) |
| void | deparseDeleteSql (StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *returningList, List **retrieved_attrs) |
| void | deparseDirectDeleteSql (StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, RelOptInfo *foreignrel, List *remote_conds, List **params_list, List *returningList, List **retrieved_attrs) |
| void | deparseAnalyzeSizeSql (StringInfo buf, Relation rel) |
| void | deparseAnalyzeInfoSql (StringInfo buf, Relation rel) |
| void | deparseAnalyzeSql (StringInfo buf, Relation rel, PgFdwSamplingMethod sample_method, double sample_frac, List **retrieved_attrs) |
| void | deparseTruncateSql (StringInfo buf, List *rels, DropBehavior behavior, bool restart_seqs) |
| void | deparseStringLiteral (StringInfo buf, const char *val) |
| EquivalenceMember * | find_em_for_rel (PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel) |
| EquivalenceMember * | find_em_for_rel_target (PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel) |
| List * | build_tlist_to_deparse (RelOptInfo *foreignrel) |
| void | deparseSelectStmtForRel (StringInfo buf, PlannerInfo *root, RelOptInfo *rel, List *tlist, List *remote_conds, List *pathkeys, bool has_final_sort, bool has_limit, bool is_subquery, List **retrieved_attrs, List **params_list) |
| const char * | get_jointype_name (JoinType jointype) |
| bool | is_builtin (Oid objectId) |
| bool | is_shippable (Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo) |
Variables | |
| char * | pgfdw_application_name |
| typedef struct PgFdwConnState PgFdwConnState |
| typedef struct PgFdwRelationInfo PgFdwRelationInfo |
| typedef enum PgFdwSamplingMethod PgFdwSamplingMethod |
| enum PgFdwSamplingMethod |
| Enumerator | |
|---|---|
| ANALYZE_SAMPLE_OFF | |
| ANALYZE_SAMPLE_AUTO | |
| ANALYZE_SAMPLE_RANDOM | |
| ANALYZE_SAMPLE_SYSTEM | |
| ANALYZE_SAMPLE_BERNOULLI | |
Definition at line 145 of file postgres_fdw.h.
| List * build_tlist_to_deparse | ( | RelOptInfo * | foreignrel | ) |
Definition at line 1209 of file deparse.c.
References add_to_flat_tlist(), RestrictInfo::clause, PathTarget::exprs, PgFdwRelationInfo::grouped_tlist, if(), IS_UPPER_REL, lfirst_node, PgFdwRelationInfo::local_conds, NIL, pull_var_clause(), PVC_RECURSE_PLACEHOLDERS, and RelOptInfo::reltarget.
Referenced by estimate_path_cost_size(), and postgresGetForeignPlan().
| void classifyConditions | ( | PlannerInfo * | root, |
| RelOptInfo * | baserel, | ||
| List * | input_conds, | ||
| List ** | remote_conds, | ||
| List ** | local_conds | ||
| ) |
Definition at line 218 of file deparse.c.
References RestrictInfo::clause, is_foreign_expr(), lappend(), lfirst_node, NIL, and root.
Referenced by estimate_path_cost_size(), and postgresGetForeignRelSize().
| void deparseAnalyzeInfoSql | ( | StringInfo | buf, |
| Relation | rel | ||
| ) |
Definition at line 2552 of file deparse.c.
References appendStringInfoString(), buf, nameData::data, deparseRelation(), deparseStringLiteral(), initStringInfo(), and relname.
Referenced by postgresGetAnalyzeInfoForForeignTable().
| void deparseAnalyzeSizeSql | ( | StringInfo | buf, |
| Relation | rel | ||
| ) |
Definition at line 2530 of file deparse.c.
References appendStringInfo(), appendStringInfoString(), buf, nameData::data, deparseRelation(), deparseStringLiteral(), initStringInfo(), and relname.
Referenced by postgresAnalyzeForeignTable().
| void deparseAnalyzeSql | ( | StringInfo | buf, |
| Relation | rel, | ||
| PgFdwSamplingMethod | sample_method, | ||
| double | sample_frac, | ||
| List ** | retrieved_attrs | ||
| ) |
Definition at line 2592 of file deparse.c.
References ANALYZE_SAMPLE_AUTO, ANALYZE_SAMPLE_BERNOULLI, ANALYZE_SAMPLE_OFF, ANALYZE_SAMPLE_RANDOM, ANALYZE_SAMPLE_SYSTEM, appendStringInfo(), appendStringInfoString(), attname, buf, defGetString(), DefElem::defname, deparseRelation(), elog, ERROR, GetForeignColumnOptions(), i, lappend_int(), lfirst, NameStr, TupleDescData::natts, NIL, options, quote_identifier(), RelationGetDescr, RelationGetRelid, and TupleDescAttr().
Referenced by postgresAcquireSampleRowsFunc().
| void deparseDeleteSql | ( | StringInfo | buf, |
| RangeTblEntry * | rte, | ||
| Index | rtindex, | ||
| Relation | rel, | ||
| List * | returningList, | ||
| List ** | retrieved_attrs | ||
| ) |
Definition at line 2393 of file deparse.c.
References appendStringInfoString(), buf, deparseRelation(), deparseReturningList(), NIL, TriggerDesc::trig_delete_after_row, and RelationData::trigdesc.
Referenced by postgresPlanForeignModify().
| void deparseDirectDeleteSql | ( | StringInfo | buf, |
| PlannerInfo * | root, | ||
| Index | rtindex, | ||
| Relation | rel, | ||
| RelOptInfo * | foreignrel, | ||
| List * | remote_conds, | ||
| List ** | params_list, | ||
| List * | returningList, | ||
| List ** | retrieved_attrs | ||
| ) |
Definition at line 2422 of file deparse.c.
References appendStringInfo(), appendStringInfoString(), appendWhereClause(), deparse_expr_cxt::buf, buf, deparseExplicitTargetList(), deparseFromExprForRel(), deparseRelation(), deparseReturningList(), deparse_expr_cxt::foreignrel, list_concat(), list_free_deep(), NIL, deparse_expr_cxt::params_list, planner_rt_fetch, REL_ALIAS_PREFIX, RELOPT_JOINREL, RelOptInfo::reloptkind, deparse_expr_cxt::root, root, and deparse_expr_cxt::scanrel.
Referenced by postgresPlanDirectModify().
| void deparseDirectUpdateSql | ( | StringInfo | buf, |
| PlannerInfo * | root, | ||
| Index | rtindex, | ||
| Relation | rel, | ||
| RelOptInfo * | foreignrel, | ||
| List * | targetlist, | ||
| List * | targetAttrs, | ||
| List * | remote_conds, | ||
| List ** | params_list, | ||
| List * | returningList, | ||
| List ** | retrieved_attrs | ||
| ) |
Definition at line 2307 of file deparse.c.
References appendStringInfo(), appendStringInfoString(), appendWhereClause(), Assert(), attnum, deparse_expr_cxt::buf, buf, deparseColumnRef(), deparseExplicitTargetList(), deparseExpr(), deparseFromExprForRel(), deparseRelation(), deparseReturningList(), TargetEntry::expr, forboth, deparse_expr_cxt::foreignrel, lfirst_int, lfirst_node, list_concat(), list_free_deep(), NIL, deparse_expr_cxt::params_list, planner_rt_fetch, REL_ALIAS_PREFIX, RELOPT_JOINREL, RelOptInfo::reloptkind, reset_transmission_modes(), deparse_expr_cxt::root, root, deparse_expr_cxt::scanrel, and set_transmission_modes().
Referenced by postgresPlanDirectModify().
| void deparseInsertSql | ( | StringInfo | buf, |
| RangeTblEntry * | rte, | ||
| Index | rtindex, | ||
| Relation | rel, | ||
| List * | targetAttrs, | ||
| bool | doNothing, | ||
| List * | withCheckOptionList, | ||
| List * | returningList, | ||
| List ** | retrieved_attrs, | ||
| int * | values_end_len | ||
| ) |
Definition at line 2114 of file deparse.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), CompactAttribute::attgenerated, attnum, buf, deparseColumnRef(), deparseRelation(), deparseReturningList(), lfirst_int, RelationGetDescr, TriggerDesc::trig_insert_after_row, RelationData::trigdesc, and TupleDescCompactAttr().
Referenced by postgresBeginForeignInsert(), and postgresPlanForeignModify().
| void deparseSelectStmtForRel | ( | StringInfo | buf, |
| PlannerInfo * | root, | ||
| RelOptInfo * | rel, | ||
| List * | tlist, | ||
| List * | remote_conds, | ||
| List * | pathkeys, | ||
| bool | has_final_sort, | ||
| bool | has_limit, | ||
| bool | is_subquery, | ||
| List ** | retrieved_attrs, | ||
| List ** | params_list | ||
| ) |
Definition at line 1266 of file deparse.c.
References appendConditions(), appendGroupByClause(), appendLimitClause(), appendOrderByClause(), appendStringInfoString(), Assert(), deparse_expr_cxt::buf, buf, deparseFromExpr(), deparseLockingClause(), deparseSelectSql(), deparse_expr_cxt::foreignrel, IS_JOIN_REL, IS_SIMPLE_REL, IS_UPPER_REL, PgFdwRelationInfo::outerrel, deparse_expr_cxt::params_list, PgFdwRelationInfo::remote_conds, deparse_expr_cxt::root, root, and deparse_expr_cxt::scanrel.
Referenced by deparseRangeTblRef(), estimate_path_cost_size(), and postgresGetForeignPlan().
| void deparseStringLiteral | ( | StringInfo | buf, |
| const char * | val | ||
| ) |
Definition at line 2880 of file deparse.c.
References appendStringInfoChar(), buf, ESCAPE_STRING_SYNTAX, SQL_STR_DOUBLE, and val.
Referenced by deparseAnalyzeInfoSql(), deparseAnalyzeSizeSql(), deparseConst(), and postgresImportForeignSchema().
| void deparseTruncateSql | ( | StringInfo | buf, |
| List * | rels, | ||
| DropBehavior | behavior, | ||
| bool | restart_seqs | ||
| ) |
Definition at line 2677 of file deparse.c.
References appendStringInfo(), appendStringInfoString(), buf, deparseRelation(), DROP_CASCADE, DROP_RESTRICT, lfirst, and list_head().
Referenced by postgresExecForeignTruncate().
| void deparseUpdateSql | ( | StringInfo | buf, |
| RangeTblEntry * | rte, | ||
| Index | rtindex, | ||
| Relation | rel, | ||
| List * | targetAttrs, | ||
| List * | withCheckOptionList, | ||
| List * | returningList, | ||
| List ** | retrieved_attrs | ||
| ) |
Definition at line 2247 of file deparse.c.
References appendStringInfo(), appendStringInfoString(), CompactAttribute::attgenerated, attnum, buf, deparseColumnRef(), deparseRelation(), deparseReturningList(), lfirst_int, RelationGetDescr, TriggerDesc::trig_update_after_row, RelationData::trigdesc, and TupleDescCompactAttr().
Referenced by postgresPlanForeignModify().
| void do_sql_command | ( | PGconn * | conn, |
| const char * | sql | ||
| ) |
Definition at line 811 of file connection.c.
References conn, do_sql_command_begin(), and do_sql_command_end().
Referenced by begin_remote_xact(), configure_remote_session(), pgfdw_subxact_callback(), pgfdw_xact_callback(), and postgresExecForeignTruncate().
| int ExtractConnectionOptions | ( | List * | defelems, |
| const char ** | keywords, | ||
| const char ** | values | ||
| ) |
Definition at line 414 of file option.c.
References defGetString(), DefElem::defname, i, InitPgFdwOptions(), is_libpq_option(), keywords, lfirst, and values.
Referenced by connect_pg_server().
| List * ExtractExtensionList | ( | const char * | extensionsString, |
| bool | warnOnMissing | ||
| ) |
Definition at line 445 of file option.c.
References ereport, errcode(), errmsg(), ERROR, get_extension_oid(), lappend_oid(), lfirst, list_free(), NIL, OidIsValid, pstrdup(), SplitIdentifierString(), and WARNING.
Referenced by apply_server_options(), and postgres_fdw_validator().
| EquivalenceMember * find_em_for_rel | ( | PlannerInfo * | root, |
| EquivalenceClass * | ec, | ||
| RelOptInfo * | rel | ||
| ) |
Definition at line 7751 of file postgres_fdw.c.
References bms_intersect(), bms_is_empty, bms_is_subset(), eclass_member_iterator_next(), PgFdwRelationInfo::hidden_subquery_rels, is_foreign_expr(), RelOptInfo::relids, root, and setup_eclass_member_iterator().
Referenced by appendOrderByClause(), get_useful_pathkeys_for_relation(), and is_foreign_pathkey().
| EquivalenceMember * find_em_for_rel_target | ( | PlannerInfo * | root, |
| EquivalenceClass * | ec, | ||
| RelOptInfo * | rel | ||
| ) |
Definition at line 7786 of file postgres_fdw.c.
References Assert(), EquivalenceClass::ec_members, EquivalenceMember::em_expr, EquivalenceMember::em_is_child, EquivalenceMember::em_is_const, equal(), PathTarget::exprs, get_pathtarget_sortgroupref, get_sortgroupref_clause_noerr(), i, is_foreign_expr(), IsA, lfirst, RelOptInfo::reltarget, and root.
Referenced by add_foreign_ordered_paths(), and appendOrderByClause().
| const char * get_jointype_name | ( | JoinType | jointype | ) |
Definition at line 1672 of file deparse.c.
References elog, ERROR, JOIN_FULL, JOIN_INNER, JOIN_LEFT, JOIN_RIGHT, and JOIN_SEMI.
Referenced by deparseFromExprForRel(), and foreign_join_ok().
| PGconn * GetConnection | ( | UserMapping * | user, |
| bool | will_prep_stmt, | ||
| PgFdwConnState ** | state | ||
| ) |
Definition at line 206 of file connection.c.
References Assert(), begin_remote_xact(), CacheRegisterSyscacheCallback(), ConnCacheEntry::conn, CONNECTION_BAD, ConnectionHash, CopyErrorData(), ctl, CurrentMemoryContext, DEBUG3, disconnect_pg_server(), elog, ereport, errdetail_internal(), errmsg_internal(), FlushErrorState(), FreeErrorData(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, hash_search(), ConnCacheEntry::have_prep_stmt, ConnCacheEntry::invalidated, sort-test::key, make_new_connection(), MemoryContextSwitchTo(), pchomp(), PgFdwConnState::pendingAreq, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pgfdw_inval_callback(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_subxact_callback(), pgfdw_we_get_result, pgfdw_xact_callback(), PQerrorMessage(), PQstatus(), process_pending_request(), RegisterSubXactCallback(), RegisterXactCallback(), ErrorData::sqlerrcode, ConnCacheEntry::state, user, WaitEventExtensionNew(), ConnCacheEntry::xact_depth, and xact_got_connection.
Referenced by create_foreign_modify(), dumpDatabase(), dumpDatabaseConfig(), dumpLOs(), dumpTableData_copy(), estimate_path_cost_size(), expand_extension_name_patterns(), expand_foreign_server_name_patterns(), expand_schema_name_patterns(), expand_table_name_patterns(), getTables(), main(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresBeginDirectModify(), postgresBeginForeignScan(), postgresExecForeignTruncate(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), setup_connection(), StartLogStreamer(), StreamLog(), and StreamLogicalLog().
| unsigned int GetCursorNumber | ( | PGconn * | conn | ) |
Definition at line 918 of file connection.c.
References cursor_number.
Referenced by postgresAcquireSampleRowsFunc(), and postgresBeginForeignScan().
| unsigned int GetPrepStmtNumber | ( | PGconn * | conn | ) |
Definition at line 932 of file connection.c.
References prep_stmt_number.
Referenced by prepare_foreign_modify().
| bool is_builtin | ( | Oid | objectId | ) |
Definition at line 152 of file shippable.c.
References FirstGenbkiObjectId.
Referenced by deparse_type_name(), and is_shippable().
| bool is_foreign_expr | ( | PlannerInfo * | root, |
| RelOptInfo * | baserel, | ||
| Expr * | expr | ||
| ) |
Definition at line 244 of file deparse.c.
References foreign_loc_cxt::collation, contain_mutable_functions(), FDW_COLLATE_NONE, FDW_COLLATE_UNSAFE, foreign_expr_walker(), foreign_glob_cxt::foreignrel, if(), InvalidOid, IS_UPPER_REL, PgFdwRelationInfo::outerrel, foreign_glob_cxt::relids, RelOptInfo::relids, foreign_glob_cxt::root, root, and foreign_loc_cxt::state.
Referenced by add_foreign_final_paths(), classifyConditions(), find_em_for_rel(), find_em_for_rel_target(), foreign_grouping_ok(), foreign_join_ok(), postgresGetForeignPaths(), postgresGetForeignPlan(), and postgresPlanDirectModify().
| bool is_foreign_param | ( | PlannerInfo * | root, |
| RelOptInfo * | baserel, | ||
| Expr * | expr | ||
| ) |
Definition at line 1115 of file deparse.c.
References bms_is_member(), if(), IS_UPPER_REL, nodeTag, PgFdwRelationInfo::outerrel, RelOptInfo::relids, Var::varlevelsup, and Var::varno.
Referenced by foreign_grouping_ok().
| bool is_foreign_pathkey | ( | PlannerInfo * | root, |
| RelOptInfo * | baserel, | ||
| PathKey * | pathkey | ||
| ) |
Definition at line 1156 of file deparse.c.
References EquivalenceClass::ec_has_volatile, find_em_for_rel(), if(), is_shippable(), PathKey::pk_opfamily, and root.
Referenced by get_useful_pathkeys_for_relation().
| bool is_shippable | ( | Oid | objectId, |
| Oid | classId, | ||
| PgFdwRelationInfo * | fpinfo | ||
| ) |
Definition at line 162 of file shippable.c.
References HASH_ENTER, HASH_FIND, hash_search(), InitializeShippableCache(), is_builtin(), sort-test::key, lookup_shippable(), NIL, PgFdwRelationInfo::server, ForeignServer::serverid, ShippableCacheEntry::shippable, PgFdwRelationInfo::shippable_extensions, and ShippableCacheHash.
Referenced by add_foreign_ordered_paths(), foreign_expr_walker(), get_useful_pathkeys_for_relation(), and is_foreign_pathkey().
| PGresult * pgfdw_exec_query | ( | PGconn * | conn, |
| const char * | query, | ||
| PgFdwConnState * | state | ||
| ) |
Definition at line 947 of file connection.c.
References conn, pgfdw_get_result(), PQsendQuery(), and process_pending_request().
Referenced by close_cursor(), deallocate_query(), fetch_more_data(), get_remote_estimate(), pgfdw_xact_callback(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), and postgresReScanForeignScan().
Definition at line 964 of file connection.c.
References conn, libpqsrv_get_result_last(), and pgfdw_we_get_result.
Referenced by create_cursor(), do_sql_command_end(), execute_dml_stmt(), execute_foreign_modify(), fetch_more_data(), pgfdw_exec_query(), and prepare_foreign_modify().
Definition at line 995 of file connection.c.
References Assert(), conn, ERROR, and pgfdw_report_internal().
Referenced by pgfdw_exec_cleanup_query_begin(), and pgfdw_exec_cleanup_query_end().
| pg_noreturn void pgfdw_report_error | ( | PGresult * | res, |
| PGconn * | conn, | ||
| const char * | sql | ||
| ) |
Definition at line 988 of file connection.c.
References conn, ERROR, pg_unreachable, and pgfdw_report_internal().
Referenced by close_cursor(), create_cursor(), deallocate_query(), do_sql_command_begin(), do_sql_command_end(), execute_dml_stmt(), execute_foreign_modify(), fetch_more_data(), fetch_more_data_begin(), get_remote_estimate(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresForeignAsyncNotify(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), postgresReScanForeignScan(), and prepare_foreign_modify().
| void process_pending_request | ( | AsyncRequest * | areq | ) |
Definition at line 7424 of file postgres_fdw.c.
References Assert(), AsyncRequest::callback_pending, ExecAsyncRequestDone(), ExecAsyncResponse(), ForeignScanState::fdw_state, fetch_more_data(), and AsyncRequest::requestee.
Referenced by create_cursor(), execute_dml_stmt(), execute_foreign_modify(), GetConnection(), pgfdw_exec_query(), and postgresForeignAsyncConfigureWait().
| char * process_pgfdw_appname | ( | const char * | appname | ) |
Definition at line 491 of file option.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), application_name, buf, cluster_name, Port::database_name, dbname, initStringInfo(), MyProcPid, MyProcPort, MyStartTime, Port::user_name, and username.
Referenced by connect_pg_server().
| void rebuildInsertSql | ( | StringInfo | buf, |
| Relation | rel, | ||
| char * | orig_query, | ||
| List * | target_attrs, | ||
| int | values_end_len, | ||
| int | num_params, | ||
| int | num_rows | ||
| ) |
Definition at line 2187 of file deparse.c.
References appendBinaryStringInfo(), appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert(), CompactAttribute::attgenerated, attnum, buf, i, lfirst_int, RelationGetDescr, and TupleDescCompactAttr().
Referenced by execute_foreign_modify().
| void ReleaseConnection | ( | PGconn * | conn | ) |
Definition at line 897 of file connection.c.
Referenced by estimate_path_cost_size(), finish_foreign_modify(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresEndDirectModify(), postgresEndForeignScan(), postgresGetAnalyzeInfoForForeignTable(), and postgresImportForeignSchema().
| void reset_transmission_modes | ( | int | nestlevel | ) |
Definition at line 3929 of file postgres_fdw.c.
References AtEOXact_GUC().
Referenced by appendConditions(), appendLimitClause(), appendOrderByClause(), convert_prep_stmt_params(), deparseDirectUpdateSql(), and process_query_params().
| int set_transmission_modes | ( | void | ) |
Definition at line 3893 of file postgres_fdw.c.
References DateStyle, extra_float_digits, GUC_ACTION_SAVE, IntervalStyle, INTSTYLE_POSTGRES, NewGUCNestLevel(), PGC_S_SESSION, PGC_USERSET, set_config_option(), and USE_ISO_DATES.
Referenced by appendConditions(), appendLimitClause(), appendOrderByClause(), convert_prep_stmt_params(), deparseDirectUpdateSql(), and process_query_params().
|
extern |
Definition at line 46 of file option.c.
Referenced by _PG_init(), and connect_pg_server().