Skip to content

Commit 43b7455

Browse files
committed
Add support for Postgres 10 in pgut lib
1 parent 67ddb22 commit 43b7455

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pgut/pgut.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,16 @@ prompt_for_password(const char *username)
880880
password = NULL;
881881
}
882882

883+
#if PG_VERSION_NUM >= 100000
884+
if (username == NULL)
885+
simple_prompt("Password: ", password, 100, false);
886+
else
887+
{
888+
char message[256];
889+
snprintf(message, lengthof(message), "Password for user %s: ", username);
890+
simple_prompt(message, password, 100, false);
891+
}
892+
#else
883893
if (username == NULL)
884894
password = simple_prompt("Password: ", 100, false);
885895
else
@@ -888,6 +898,7 @@ prompt_for_password(const char *username)
888898
snprintf(message, lengthof(message), "Password for user %s: ", username);
889899
password = simple_prompt(message, 100, false);
890900
}
901+
#endif
891902
}
892903
#endif
893904

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy