Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5sbo-0006Yv-DN for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jun 2022 17:33:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o5sbn-0005np-4c for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jun 2022 17:33:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5sbm-0005ng-68 for pgsql-hackers@lists.postgresql.org; Mon, 27 Jun 2022 17:33:10 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5sbi-00049F-3g for pgsql-hackers@lists.postgresql.org; Mon, 27 Jun 2022 17:33:09 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 80B82320083A; Mon, 27 Jun 2022 13:33:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 27 Jun 2022 13:33:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1656351179; x=1656437579; bh=g VHXydX+8ZLG48bFVPen+st0YYhRhEDM8iQV67wVubs=; b=eND5vX4y0Di/519kh q1nohFaQl9MzYiLJsPESQuZW6wQ9+mBCol2oAClJZf+LkuHCr++ZjCSSrtdyoLWI 3bXhWbtEpfW29TKv9t2XEFOk/PJFEVinpfZqVpn/0DV31J2GZ/iNRFTUD/PitwUm ieGJlLpsTmUkfHLROv7HRArna3odttrkp4MS/MF8g+uJCA0yZJ1ZP37AoVozblf6 twkaT+T2o7XQegpggseINCM3I2Pxku6TbLbwgiNlgcv3hrazvAYsrSGWA6IXFxB9 BUCeskobl7cRmrwU4a+fhmV/mZHQ5hPMPNr4hPIQiBWgW8aNIuhbAI5Q6e287hTb cpoXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeghedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Jun 2022 13:32:58 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8FC2E366; Mon, 27 Jun 2022 19:32:50 +0200 (CEST) Date: Mon, 27 Jun 2022 19:32:50 +0200 From: Alvaro Herrera To: "Drouvot, Bertrand" Cc: Jacob Champion , Joe Conway , Tom Lane , PostgreSQL Hackers Subject: Re: SYSTEM_USER reserved word implementation Message-ID: <20220627173250.46lvecpvuunc7pf5@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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/