1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-08 13:44:32 +02:00

Add support for Postgres 10 in pgut lib

This commit is contained in:
stalkerg 2016-09-27 18:17:34 +03:00
parent 67ddb22d61
commit 43b7455601

View File

@ -880,6 +880,16 @@ prompt_for_password(const char *username)
password = NULL;
}
#if PG_VERSION_NUM >= 100000
if (username == NULL)
simple_prompt("Password: ", password, 100, false);
else
{
char message[256];
snprintf(message, lengthof(message), "Password for user %s: ", username);
simple_prompt(message, password, 100, false);
}
#else
if (username == NULL)
password = simple_prompt("Password: ", 100, false);
else
@ -888,6 +898,7 @@ prompt_for_password(const char *username)
snprintf(message, lengthof(message), "Password for user %s: ", username);
password = simple_prompt(message, 100, false);
}
#endif
}
#endif