mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Apply PGDLLIMPORT markings broadly.
Up until now, we've had a policy of only marking certain variables in the PostgreSQL header files with PGDLLIMPORT, but now we've decided to mark them all. This means that extensions running on Windows should no longer operate at a disadvantage as compared to extensions running on Linux: if the variable is present in a header file, it should be accessible. Discussion: http://postgr.es/m/CA+TgmoYanc1_FSfimhgiWSqVyP5KKmh5NP2BWNwDhO8Pg2vGYQ@mail.gmail.com
This commit is contained in:
@@ -339,7 +339,7 @@ typedef struct ArrayIteratorData *ArrayIterator;
|
||||
/*
|
||||
* GUC parameter
|
||||
*/
|
||||
extern bool Array_nulls;
|
||||
extern PGDLLIMPORT bool Array_nulls;
|
||||
|
||||
/*
|
||||
* prototypes for functions defined in arrayfuncs.c
|
||||
|
||||
@@ -64,7 +64,7 @@ extern char *regexp_fixed_prefix(text *text_re, bool case_insensitive,
|
||||
Oid collation, bool *exact);
|
||||
|
||||
/* ruleutils.c */
|
||||
extern bool quote_all_identifiers;
|
||||
extern PGDLLIMPORT bool quote_all_identifiers;
|
||||
extern const char *quote_identifier(const char *ident);
|
||||
extern char *quote_qualified_identifier(const char *qualifier,
|
||||
const char *ident);
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef enum
|
||||
BYTEA_OUTPUT_HEX
|
||||
} ByteaOutputType;
|
||||
|
||||
extern int bytea_output; /* ByteaOutputType, but int for GUC enum */
|
||||
extern PGDLLIMPORT int bytea_output; /* ByteaOutputType, but int for GUC
|
||||
* enum */
|
||||
|
||||
#endif /* BYTEA_H */
|
||||
|
||||
@@ -257,9 +257,10 @@ do { \
|
||||
* Include check for leap year.
|
||||
*/
|
||||
|
||||
extern const char *const months[]; /* months (3-char abbreviations) */
|
||||
extern const char *const days[]; /* days (full names) */
|
||||
extern const int day_tab[2][13];
|
||||
extern PGDLLIMPORT const char *const months[]; /* months (3-char
|
||||
* abbreviations) */
|
||||
extern PGDLLIMPORT const char *const days[]; /* days (full names) */
|
||||
extern PGDLLIMPORT const int day_tab[2][13];
|
||||
|
||||
/*
|
||||
* These are the rules for the Gregorian calendar, which was adopted in 1582.
|
||||
|
||||
@@ -424,12 +424,12 @@ typedef enum
|
||||
PGERROR_VERBOSE /* all the facts, ma'am */
|
||||
} PGErrorVerbosity;
|
||||
|
||||
extern int Log_error_verbosity;
|
||||
extern char *Log_line_prefix;
|
||||
extern int Log_destination;
|
||||
extern char *Log_destination_string;
|
||||
extern bool syslog_sequence_numbers;
|
||||
extern bool syslog_split_messages;
|
||||
extern PGDLLIMPORT int Log_error_verbosity;
|
||||
extern PGDLLIMPORT char *Log_line_prefix;
|
||||
extern PGDLLIMPORT int Log_destination;
|
||||
extern PGDLLIMPORT char *Log_destination_string;
|
||||
extern PGDLLIMPORT bool syslog_sequence_numbers;
|
||||
extern PGDLLIMPORT bool syslog_split_messages;
|
||||
|
||||
/* Log destination bitmap */
|
||||
#define LOG_DESTINATION_STDERR 1
|
||||
|
||||
@@ -32,17 +32,18 @@ typedef struct
|
||||
PGFunction func; /* pointer to compiled function */
|
||||
} FmgrBuiltin;
|
||||
|
||||
extern const FmgrBuiltin fmgr_builtins[];
|
||||
extern PGDLLIMPORT const FmgrBuiltin fmgr_builtins[];
|
||||
|
||||
extern const int fmgr_nbuiltins; /* number of entries in table */
|
||||
extern PGDLLIMPORT const int fmgr_nbuiltins; /* number of entries in table */
|
||||
|
||||
extern const Oid fmgr_last_builtin_oid; /* highest function OID in table */
|
||||
extern PGDLLIMPORT const Oid fmgr_last_builtin_oid; /* highest function OID in
|
||||
* table */
|
||||
|
||||
/*
|
||||
* Mapping from a builtin function's OID to its index in the fmgr_builtins
|
||||
* array. This is indexed from 0 through fmgr_last_builtin_oid.
|
||||
*/
|
||||
#define InvalidOidBuiltinMapping PG_UINT16_MAX
|
||||
extern const uint16 fmgr_builtin_oid_index[];
|
||||
extern PGDLLIMPORT const uint16 fmgr_builtin_oid_index[];
|
||||
|
||||
#endif /* FMGRTAB_H */
|
||||
|
||||
@@ -239,53 +239,53 @@ typedef enum
|
||||
|
||||
|
||||
/* GUC vars that are actually declared in guc.c, rather than elsewhere */
|
||||
extern bool Debug_print_plan;
|
||||
extern bool Debug_print_parse;
|
||||
extern bool Debug_print_rewritten;
|
||||
extern bool Debug_pretty_print;
|
||||
extern PGDLLIMPORT bool Debug_print_plan;
|
||||
extern PGDLLIMPORT bool Debug_print_parse;
|
||||
extern PGDLLIMPORT bool Debug_print_rewritten;
|
||||
extern PGDLLIMPORT bool Debug_pretty_print;
|
||||
|
||||
extern bool log_parser_stats;
|
||||
extern bool log_planner_stats;
|
||||
extern bool log_executor_stats;
|
||||
extern bool log_statement_stats;
|
||||
extern bool log_btree_build_stats;
|
||||
extern PGDLLIMPORT bool log_parser_stats;
|
||||
extern PGDLLIMPORT bool log_planner_stats;
|
||||
extern PGDLLIMPORT bool log_executor_stats;
|
||||
extern PGDLLIMPORT bool log_statement_stats;
|
||||
extern PGDLLIMPORT bool log_btree_build_stats;
|
||||
|
||||
extern PGDLLIMPORT bool check_function_bodies;
|
||||
extern bool session_auth_is_superuser;
|
||||
extern PGDLLIMPORT bool session_auth_is_superuser;
|
||||
|
||||
extern bool log_duration;
|
||||
extern int log_parameter_max_length;
|
||||
extern int log_parameter_max_length_on_error;
|
||||
extern int log_min_error_statement;
|
||||
extern PGDLLIMPORT bool log_duration;
|
||||
extern PGDLLIMPORT int log_parameter_max_length;
|
||||
extern PGDLLIMPORT int log_parameter_max_length_on_error;
|
||||
extern PGDLLIMPORT int log_min_error_statement;
|
||||
extern PGDLLIMPORT int log_min_messages;
|
||||
extern PGDLLIMPORT int client_min_messages;
|
||||
extern int log_min_duration_sample;
|
||||
extern int log_min_duration_statement;
|
||||
extern int log_temp_files;
|
||||
extern double log_statement_sample_rate;
|
||||
extern double log_xact_sample_rate;
|
||||
extern char *backtrace_functions;
|
||||
extern char *backtrace_symbol_list;
|
||||
extern PGDLLIMPORT int log_min_duration_sample;
|
||||
extern PGDLLIMPORT int log_min_duration_statement;
|
||||
extern PGDLLIMPORT int log_temp_files;
|
||||
extern PGDLLIMPORT double log_statement_sample_rate;
|
||||
extern PGDLLIMPORT double log_xact_sample_rate;
|
||||
extern PGDLLIMPORT char *backtrace_functions;
|
||||
extern PGDLLIMPORT char *backtrace_symbol_list;
|
||||
|
||||
extern int temp_file_limit;
|
||||
extern PGDLLIMPORT int temp_file_limit;
|
||||
|
||||
extern int num_temp_buffers;
|
||||
extern PGDLLIMPORT int num_temp_buffers;
|
||||
|
||||
extern PGDLLIMPORT char *cluster_name;
|
||||
extern PGDLLIMPORT char *ConfigFileName;
|
||||
extern char *HbaFileName;
|
||||
extern char *IdentFileName;
|
||||
extern char *external_pid_file;
|
||||
extern PGDLLIMPORT char *HbaFileName;
|
||||
extern PGDLLIMPORT char *IdentFileName;
|
||||
extern PGDLLIMPORT char *external_pid_file;
|
||||
|
||||
extern PGDLLIMPORT char *application_name;
|
||||
|
||||
extern int tcp_keepalives_idle;
|
||||
extern int tcp_keepalives_interval;
|
||||
extern int tcp_keepalives_count;
|
||||
extern int tcp_user_timeout;
|
||||
extern PGDLLIMPORT int tcp_keepalives_idle;
|
||||
extern PGDLLIMPORT int tcp_keepalives_interval;
|
||||
extern PGDLLIMPORT int tcp_keepalives_count;
|
||||
extern PGDLLIMPORT int tcp_user_timeout;
|
||||
|
||||
#ifdef TRACE_SORT
|
||||
extern bool trace_sort;
|
||||
extern PGDLLIMPORT bool trace_sort;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -249,10 +249,10 @@ struct config_enum
|
||||
};
|
||||
|
||||
/* constant tables corresponding to enums above and in guc.h */
|
||||
extern const char *const config_group_names[];
|
||||
extern const char *const config_type_names[];
|
||||
extern const char *const GucContext_Names[];
|
||||
extern const char *const GucSource_Names[];
|
||||
extern PGDLLIMPORT const char *const config_group_names[];
|
||||
extern PGDLLIMPORT const char *const config_type_names[];
|
||||
extern PGDLLIMPORT const char *const GucContext_Names[];
|
||||
extern PGDLLIMPORT const char *const GucSource_Names[];
|
||||
|
||||
/* get the current set of variables */
|
||||
extern struct config_generic **get_guc_variables(void);
|
||||
|
||||
@@ -283,6 +283,6 @@ extern JsonbValue *JsonPathValue(Datum jb, JsonPath *jp, bool *empty,
|
||||
extern int EvalJsonPathVar(void *vars, char *varName, int varNameLen,
|
||||
JsonbValue *val, JsonbValue *baseObject);
|
||||
|
||||
extern const TableFuncRoutine JsonbTableRoutine;
|
||||
extern PGDLLIMPORT const TableFuncRoutine JsonbTableRoutine;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,16 +38,16 @@
|
||||
#define LOCALE_NAME_BUFLEN 128
|
||||
|
||||
/* GUC settings */
|
||||
extern char *locale_messages;
|
||||
extern char *locale_monetary;
|
||||
extern char *locale_numeric;
|
||||
extern char *locale_time;
|
||||
extern PGDLLIMPORT char *locale_messages;
|
||||
extern PGDLLIMPORT char *locale_monetary;
|
||||
extern PGDLLIMPORT char *locale_numeric;
|
||||
extern PGDLLIMPORT char *locale_time;
|
||||
|
||||
/* lc_time localization cache */
|
||||
extern char *localized_abbrev_days[];
|
||||
extern char *localized_full_days[];
|
||||
extern char *localized_abbrev_months[];
|
||||
extern char *localized_full_months[];
|
||||
extern PGDLLIMPORT char *localized_abbrev_days[];
|
||||
extern PGDLLIMPORT char *localized_full_days[];
|
||||
extern PGDLLIMPORT char *localized_abbrev_months[];
|
||||
extern PGDLLIMPORT char *localized_full_months[];
|
||||
|
||||
|
||||
extern bool check_locale_messages(char **newval, void **extra, GucSource source);
|
||||
@@ -103,7 +103,7 @@ struct pg_locale_struct
|
||||
|
||||
typedef struct pg_locale_struct *pg_locale_t;
|
||||
|
||||
extern struct pg_locale_struct default_locale;
|
||||
extern PGDLLIMPORT struct pg_locale_struct default_locale;
|
||||
|
||||
extern void make_icu_collator(const char *iculocstr,
|
||||
struct pg_locale_struct *resultp);
|
||||
|
||||
@@ -638,14 +638,14 @@ extern void pgstat_create_transactional(PgStat_Kind kind, Oid dboid, Oid objoid)
|
||||
* Variables in pgstat.c
|
||||
*/
|
||||
|
||||
extern PgStat_LocalState pgStatLocal;
|
||||
extern PGDLLIMPORT PgStat_LocalState pgStatLocal;
|
||||
|
||||
|
||||
/*
|
||||
* Variables in pgstat_slru.c
|
||||
*/
|
||||
|
||||
extern bool have_slrustats;
|
||||
extern PGDLLIMPORT bool have_slrustats;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,7 @@ typedef enum
|
||||
} PlanCacheMode;
|
||||
|
||||
/* GUC parameter */
|
||||
extern int plan_cache_mode;
|
||||
extern PGDLLIMPORT int plan_cache_mode;
|
||||
|
||||
#define CACHEDPLANSOURCE_MAGIC 195726186
|
||||
#define CACHEDPLAN_MAGIC 953717834
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef PS_STATUS_H
|
||||
#define PS_STATUS_H
|
||||
|
||||
extern bool update_process_title;
|
||||
extern PGDLLIMPORT bool update_process_title;
|
||||
|
||||
extern char **save_ps_display_args(int argc, char **argv);
|
||||
|
||||
|
||||
@@ -62,14 +62,14 @@ enum ComputeQueryIdType
|
||||
};
|
||||
|
||||
/* GUC parameters */
|
||||
extern int compute_query_id;
|
||||
extern PGDLLIMPORT int compute_query_id;
|
||||
|
||||
|
||||
extern const char *CleanQuerytext(const char *query, int *location, int *len);
|
||||
extern JumbleState *JumbleQuery(Query *query, const char *querytext);
|
||||
extern void EnableQueryId(void);
|
||||
|
||||
extern bool query_id_enabled;
|
||||
extern PGDLLIMPORT bool query_id_enabled;
|
||||
|
||||
/*
|
||||
* Returns whether query identifier computation has been enabled, either
|
||||
|
||||
@@ -145,9 +145,9 @@ extern void RelationCacheInitFilePostInvalidate(void);
|
||||
extern void RelationCacheInitFileRemove(void);
|
||||
|
||||
/* should be used only by relcache.c and catcache.c */
|
||||
extern bool criticalRelcachesBuilt;
|
||||
extern PGDLLIMPORT bool criticalRelcachesBuilt;
|
||||
|
||||
/* should be used only by relcache.c and postinit.c */
|
||||
extern bool criticalSharedRelcachesBuilt;
|
||||
extern PGDLLIMPORT bool criticalSharedRelcachesBuilt;
|
||||
|
||||
#endif /* RELCACHE_H */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define RLS_H
|
||||
|
||||
/* GUC variable */
|
||||
extern bool row_security;
|
||||
extern PGDLLIMPORT bool row_security;
|
||||
|
||||
/*
|
||||
* Used by callers of check_enable_rls.
|
||||
|
||||
@@ -53,7 +53,7 @@ extern TimestampTz GetSnapshotCurrentTimestamp(void);
|
||||
extern TimestampTz GetOldSnapshotThresholdTimestamp(void);
|
||||
extern void SnapshotTooOldMagicForTest(void);
|
||||
|
||||
extern bool FirstSnapshotSet;
|
||||
extern PGDLLIMPORT bool FirstSnapshotSet;
|
||||
|
||||
extern PGDLLIMPORT TransactionId TransactionXmin;
|
||||
extern PGDLLIMPORT TransactionId RecentXmin;
|
||||
|
||||
@@ -57,10 +57,10 @@
|
||||
|
||||
|
||||
/* Set at postmaster start */
|
||||
extern TimestampTz PgStartTime;
|
||||
extern PGDLLIMPORT TimestampTz PgStartTime;
|
||||
|
||||
/* Set at configuration reload */
|
||||
extern TimestampTz PgReloadTime;
|
||||
extern PGDLLIMPORT TimestampTz PgReloadTime;
|
||||
|
||||
|
||||
/* Internal routines (not fmgr-callable) */
|
||||
|
||||
@@ -75,10 +75,10 @@ extern char *map_sql_identifier_to_xml_name(const char *ident, bool fully_escape
|
||||
extern char *map_xml_name_to_sql_identifier(const char *name);
|
||||
extern char *map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings);
|
||||
|
||||
extern int xmlbinary; /* XmlBinaryType, but int for guc enum */
|
||||
extern PGDLLIMPORT int xmlbinary; /* XmlBinaryType, but int for guc enum */
|
||||
|
||||
extern int xmloption; /* XmlOptionType, but int for guc enum */
|
||||
extern PGDLLIMPORT int xmloption; /* XmlOptionType, but int for guc enum */
|
||||
|
||||
extern const TableFuncRoutine XmlTableRoutine;
|
||||
extern PGDLLIMPORT const TableFuncRoutine XmlTableRoutine;
|
||||
|
||||
#endif /* XML_H */
|
||||
|
||||
Reference in New Issue
Block a user