fix the parameter quote-all-identifiers for gs_dumpall
This commit is contained in:
@ -411,7 +411,7 @@ const char* sync_guc_variable_namelist[] = {"work_mem",
|
||||
"sql_use_spacelimit",
|
||||
"basebackup_timeout"};
|
||||
|
||||
static inline int JudgeSystemSchema(const char* spcname, const char** schema_type, int size);
|
||||
static inline bool JudgeSystemSchema(const char* spcname, const char** schema_type, int size);
|
||||
static void set_config_sourcefile(const char* name, char* sourcefile, int sourceline);
|
||||
static bool call_bool_check_hook(struct config_bool* conf, bool* newval, void** extra, GucSource source, int elevel);
|
||||
static bool call_int_check_hook(struct config_int* conf, int* newval, void** extra, GucSource source, int elevel);
|
||||
@ -16363,13 +16363,13 @@ void AlterSystemSetConfigFile(AlterSystemStmt * altersysstmt)
|
||||
* This function macth the order of the schema in the search path with the system schema to
|
||||
* make sure the system schema pg_temp and pg_catalog before the others schema in the search path
|
||||
*/
|
||||
static inline int JudgeSystemSchema(const char* spcname, const char** schema_type, int size)
|
||||
static inline bool JudgeSystemSchema(const char* spcname, const char** schema_type, int size)
|
||||
{
|
||||
/* match the system schema pg_temp and pg_catalog in the search path */
|
||||
int flag = 0;
|
||||
bool flag = false;
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (strncmp(schema_name, schema_type[i], strlen(schema_type[i])) == 0) {
|
||||
flag = 1;
|
||||
if (strncmp(spcname, schema_type[i], strlen(schema_type[i])) == 0) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -16439,8 +16439,8 @@ void ExecSetVariableStmt(VariableSetStmt* stmt)
|
||||
char* tempname = strstr(spcname, SCHEMA_TEMP_NAME);
|
||||
char* catalogname = strstr(spcname, SCHEMA_CATALOG_NAME);
|
||||
int schema_type_size = sizeof(SYSTEM_SCHEMA) / sizeof(SYSTEM_SCHEMA[0]);
|
||||
if ((tempname != NULL && JudgeSystemSchema(spcname, SYSTEM_SCHEMA, schema_type_size) == 0) ||
|
||||
(catalogname != NULL && JudgeSystemSchema(spcname, SYSTEM_SCHEMA, schema_type_size) == 0)) {
|
||||
if ((tempname != NULL && JudgeSystemSchema(spcname, SYSTEM_SCHEMA, schema_type_size) == false) ||
|
||||
(catalogname != NULL && JudgeSystemSchema(spcname, SYSTEM_SCHEMA, schema_type_size) == false)) {
|
||||
ereport(WARNING,
|
||||
(errmsg("It is invalid to set pg_temp or pg_catalog behind other schemas in search path "
|
||||
"explicitly. The priority order is pg_temp, pg_catalog and other schemas.")));
|
||||
|
||||
Reference in New Issue
Block a user