summaryrefslogtreecommitdiff
path: root/src/include/libpq
diff options
context:
space:
mode:
authorMagnus Hagander2021-04-07 12:21:19 +0000
committerMagnus Hagander2021-04-07 12:24:47 +0000
commitc1968426ba3de1fe37848863e35fff30261bf941 (patch)
tree44b642d65b582ff1b080fe251cf94d6eaef9b424 /src/include/libpq
parent4560e0acdafd57f3ba109b98e15ac047798d960c (diff)
Refactor hba_authname
The previous implementation (from 9afffcb833) had an unnecessary check on the boundaries of the enum which trigtered compile warnings. To clean it up, move the pre-existing static assert to a central location and call that. Reported-By: Erik Rijkers Reviewed-By: Michael Paquier Discussion: https://postgr.es/m/1056399262.13159.1617793249020@webmailclassic.xs4all.nl
Diffstat (limited to 'src/include/libpq')
-rw-r--r--src/include/libpq/hba.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h
index 63f2962139f..8d9f3821b12 100644
--- a/src/include/libpq/hba.h
+++ b/src/include/libpq/hba.h
@@ -137,7 +137,7 @@ typedef struct Port hbaPort;
extern bool load_hba(void);
extern bool load_ident(void);
-extern const char *hba_authname(hbaPort *port);
+extern const char *hba_authname(UserAuth auth_method);
extern void hba_getauthmethod(hbaPort *port);
extern int check_usermap(const char *usermap_name,
const char *pg_role, const char *auth_user,