pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Drouvot, Bertrand <bdrouvot@amazon.com>
Cc: Jacob Champion <jchampion@timescale.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: SYSTEM_USER reserved word implementation
Date: Mon, 27 Jun 2022 19:32:50 +0200
Message-ID: <20220627173250.46lvecpvuunc7pf5@alvherre.pgsql> (raw)
In-Reply-To: <a828211c-091c-785e-c58d-770fbb0d0d19@amazon.com>

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/





view thread (42+ messages)  latest in thread

Message-ID: <20220627173250.46lvecpvuunc7pf5@alvherre.pgsql>
Permalink:  ../20220627173250.46lvecpvuunc7pf5@alvherre.pgsql/
Also on:    postgresql.org/message-id/20220627173250.46lvecpvuunc7pf5@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, bdrouvot@amazon.com, jchampion@timescale.com, mail@joeconway.com, tgl@sss.pgh.pa.us
  Subject: Re: SYSTEM_USER reserved word implementation
  In-Reply-To: <20220627173250.46lvecpvuunc7pf5@alvherre.pgsql>
  References: <a828211c-091c-785e-c58d-770fbb0d0d19@amazon.com> <20220627173250.46lvecpvuunc7pf5@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox