PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/reloptions.h"
#include "catalog/pg_foreign_server.h"
#include "catalog/pg_foreign_table.h"
#include "catalog/pg_user_mapping.h"
#include "commands/defrem.h"
#include "commands/extension.h"
#include "libpq/libpq-be.h"
#include "postgres_fdw.h"
#include "utils/guc.h"
#include "utils/varlena.h"
#include "miscadmin.h"
Go to the source code of this file.
Data Structures | |
struct | PgFdwOption |
Typedefs | |
typedef struct PgFdwOption | PgFdwOption |
Functions | |
static void | InitPgFdwOptions (void) |
static bool | is_valid_option (const char *keyword, Oid context) |
static bool | is_libpq_option (const char *keyword) |
PG_FUNCTION_INFO_V1 (postgres_fdw_validator) | |
Datum | postgres_fdw_validator (PG_FUNCTION_ARGS) |
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 | _PG_init (void) |
Variables | |
static PgFdwOption * | postgres_fdw_options |
static PQconninfoOption * | libpq_options |
char * | pgfdw_application_name = NULL |
typedef struct PgFdwOption PgFdwOption |
void _PG_init | ( | void | ) |
Definition at line 567 of file option.c.
References DefineCustomStringVariable(), MarkGUCPrefixReserved(), PGC_USERSET, and pgfdw_application_name.
int ExtractConnectionOptions | ( | List * | defelems, |
const char ** | keywords, | ||
const char ** | values | ||
) |
Definition at line 413 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 444 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().
|
static |
Definition at line 239 of file option.c.
References _PQconninfoOption::dispchar, ereport, errcode(), errdetail(), errmsg(), ERROR, InvalidOid, PgFdwOption::is_libpq_opt, PgFdwOption::keyword, _PQconninfoOption::keyword, libpq_options, malloc, PgFdwOption::optcontext, postgres_fdw_options, and PQconndefaults().
Referenced by ExtractConnectionOptions(), and postgres_fdw_validator().
|
static |
Definition at line 392 of file option.c.
References Assert, PgFdwOption::is_libpq_opt, PgFdwOption::keyword, and postgres_fdw_options.
Referenced by ExtractConnectionOptions().
|
static |
Definition at line 373 of file option.c.
References Assert, PgFdwOption::keyword, PgFdwOption::optcontext, and postgres_fdw_options.
Referenced by postgres_fdw_validator().
PG_FUNCTION_INFO_V1 | ( | postgres_fdw_validator | ) |
Datum postgres_fdw_validator | ( | PG_FUNCTION_ARGS | ) |
Definition at line 71 of file option.c.
References defGetBoolean(), defGetString(), DefElem::defname, ereport, errcode(), errhint(), errmsg(), ERROR, ExtractExtensionList(), getClosestMatch(), initClosestMatch(), InitPgFdwOptions(), is_valid_option(), PgFdwOption::keyword, lfirst, match_state, PgFdwOption::optcontext, parse_int(), parse_real(), PG_GETARG_DATUM, PG_GETARG_OID, PG_RETURN_VOID, postgres_fdw_options, superuser(), untransformRelOptions(), updateClosestMatch(), and value.
char * process_pgfdw_appname | ( | const char * | appname | ) |
Definition at line 490 of file option.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), application_name, buf, cluster_name, Port::database_name, dbname, initStringInfo(), INT64_HEX_FORMAT, MyProcPid, MyProcPort, MyStartTime, Port::user_name, and username.
Referenced by connect_pg_server().
|
static |
Definition at line 46 of file option.c.
Referenced by InitPgFdwOptions().
char* pgfdw_application_name = NULL |
Definition at line 51 of file option.c.
Referenced by _PG_init(), and connect_pg_server().
|
static |
Definition at line 40 of file option.c.
Referenced by InitPgFdwOptions(), is_libpq_option(), is_valid_option(), and postgres_fdw_validator().