Re: SYSTEM_USER reserved word implementation - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: SYSTEM_USER reserved word implementation
Date
Msg-id 20220627173250.46lvecpvuunc7pf5@alvherre.pgsql
Whole thread Raw
In response to Re: SYSTEM_USER reserved word implementation  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Responses Re: SYSTEM_USER reserved word implementation
List pgsql-hackers
On 2022-Jun-25, Drouvot, Bertrand wrote:

> diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
> index 0af130fbc5..8d761512fd 100644
> --- a/src/include/miscadmin.h
> +++ b/src/include/miscadmin.h
> @@ -364,6 +364,10 @@ extern void InitializeSessionUserIdStandalone(void);
>  extern void SetSessionAuthorization(Oid userid, bool is_superuser);
>  extern Oid    GetCurrentRoleId(void);
>  extern void SetCurrentRoleId(Oid roleid, bool is_superuser);
> +/* kluge to avoid including libpq/libpq-be.h here */
> +typedef struct Port MyPort;
> +extern void InitializeSystemUser(const MyPort *port);
> +extern const char* GetSystemUser(void);

This typedef here looks quite suspicious.  I think this should suffice:

+/* kluge to avoid including libpq/libpq-be.h here */
+struct Port;
+extern void InitializeSystemUser(struct Port *port);

I suspect that having a typedef called MyPort is going to wreak serious
havoc for pgindent.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: Making the subquery alias optional in the FROM clause
Next
From: Dean Rasheed
Date:
Subject: Re: Making the subquery alias optional in the FROM clause