Re: Remove getpgusername()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Thom Brown <thom(at)linux(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove getpgusername()
Date: 2026-07-15 23:00:51
Message-ID: algRIwORXO18_xK4@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-07-15 23:09:45 Re: [DESIGN] Soft DROP TABLE, recoverable drops for PostgreSQL
Previous Message Michael Paquier 2026-07-15 22:51:55 Re: VS 2026 support on old branches