Re: Remove getpgusername() - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Remove getpgusername()
Date
Msg-id algRIwORXO18_xK4@paquier.xyz
Whole thread
In response to Re: Remove getpgusername()  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Remove getpgusername()
List pgsql-hackers
On Sun, Jul 05, 2026 at 02:09:19AM +0300, Heikki Linnakangas wrote:
> On 03/07/2026 18:35, Thom Brown wrote:
>> This function has been deprecated for 25 years (version 7.1). Can we
>> finally tear it out?
>
> Heh, +1 from me. One could also argue that it doesn't really do any harm.
> But I'm generally in favor of removing deprecated stuff even if they're not
> actively getting in the way, after enough time has passed.

That's what I call a historical artifact.  Removing it looks to be
simply a cleanup of pg_proc.dat.  Will do so if there are no
objections, freeing an OID is not a bad thing here.

> On a related note, the "getdatabaseencoding()" function doesn't seem to be
> documented...

Documenting it would not hurt, yes.  We use it a lot in the regression
tests, perhaps some extensions would gain some portability ideas if we
publish a few words about it.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: VS 2026 support on old branches
Next
From: Zsolt Parragi
Date:
Subject: Re: [DESIGN] Soft DROP TABLE, recoverable drops for PostgreSQL