fix auth_delay\auto_explain\passwordcheck _PG_init not found bug
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
|
||||
PG_MODULE_MAGIC;
|
||||
|
||||
void _PG_init(void);
|
||||
extern "C" void _PG_init(void);
|
||||
|
||||
/* GUC Variables */
|
||||
static int auth_delay_milliseconds;
|
||||
|
||||
@ -46,8 +46,8 @@ static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
|
||||
#define auto_explain_enabled() \
|
||||
(auto_explain_log_min_duration >= 0 && (nesting_level == 0 || auto_explain_log_nested_statements))
|
||||
|
||||
void _PG_init(void);
|
||||
void _PG_fini(void);
|
||||
extern "C" void _PG_init(void);
|
||||
extern "C" void _PG_fini(void);
|
||||
|
||||
static void explain_ExecutorStart(QueryDesc* queryDesc, int eflags);
|
||||
static void explain_ExecutorRun(QueryDesc* queryDesc, ScanDirection direction, long count);
|
||||
|
||||
@ -30,7 +30,7 @@ PG_MODULE_MAGIC;
|
||||
/* passwords shorter than this will be rejected */
|
||||
#define MIN_PWD_LENGTH 8
|
||||
|
||||
extern void _PG_init(void);
|
||||
extern "C" void _PG_init(void);
|
||||
|
||||
/*
|
||||
* check_password
|
||||
|
||||
@ -1233,7 +1233,7 @@ void CreateRole(CreateRoleStmt* stmt)
|
||||
int pwd_type = PASSWORD_TYPE_PLAINTEXT;
|
||||
if (isMD5(password)) {
|
||||
pwd_type = PASSWORD_TYPE_MD5;
|
||||
} else if (!isSHA256(password)) {
|
||||
} else if (isSHA256(password)) {
|
||||
pwd_type = PASSWORD_TYPE_SHA256;
|
||||
}
|
||||
|
||||
@ -2521,7 +2521,7 @@ void AlterRole(AlterRoleStmt* stmt)
|
||||
int pwd_type = PASSWORD_TYPE_PLAINTEXT;
|
||||
if (isMD5(password)) {
|
||||
pwd_type = PASSWORD_TYPE_MD5;
|
||||
} else if (!isSHA256(password)) {
|
||||
} else if (isSHA256(password)) {
|
||||
pwd_type = PASSWORD_TYPE_SHA256;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user