From: | "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Jacob Champion <jchampion(at)timescale(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: SYSTEM_USER reserved word implementation |
Date: | 2022-06-28 07:18:05 |
Message-ID: | c2727e30-a3d3-465f-f253-bfff81611a21@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 6/27/22 7:32 PM, Alvaro Herrera wrote:
> 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.
Good catch, thanks!
Attached new version to fix it as suggested.
Regards,
Bertrand
Attachment | Content-Type | Size |
---|---|---|
v2-0003-system_user-implementation.patch | text/plain | 17.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | wangw.fnst@fujitsu.com | 2022-06-28 07:20:43 | RE: Perform streaming logical transactions by background workers and parallel apply |
Previous Message | Kyotaro Horiguchi | 2022-06-28 07:09:26 | Re: [BUG] Panic due to incorrect missingContrecPtr after promotion |