Re: Remove getpgusername()

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove getpgusername()
Date: 2026-07-24 01:35:10
Message-ID: CAB8KJ=hsN7_Nng7=BNwb_L83mLMmcq_nVWnTtQiu_CUU8NOF2w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2026年7月17日(金) 15:49 Ian Lawrence Barwick <barwick(at)gmail(dot)com>:
>
> 2026年7月17日(金) 7:51 Michael Paquier <michael(at)paquier(dot)xyz>:
> >
> > On Thu, Jul 16, 2026 at 08:00:51AM +0900, Michael Paquier wrote:
> > > 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.
> >
> > And done this part.
> >
> > > 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.
> >
> > For this part, if somebody has a patch, feel free.
>
> I was feeling free, but the more I looked at it, the more horribly
> inconsistent and ugly
> "getdatabaseencoding()" is as a public SQL function name, and we have
> "pg_client_encoding()" already, so might as well rename it?
>
> Patch in separate thread:
> https://www.postgresql.org/message-id/CAB8KJ%3DiQQ3j1ZzJkgF_CGF5TvJsugp6JFOrS-LB7kT%3DXivV_Vg%40mail.gmail.com

The idea was not popular, so I submitted a plain documentation
patch: https://commitfest.postgresql.org/patch/7029/

Regards

Ian Barwick

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ZizhuanLiu X-MAN 2026-07-24 02:01:12 Re: COMMENTS are not being copied in CREATE TABLE LIKE
Previous Message Ian Lawrence Barwick 2026-07-24 01:29:58 Re: [PATCH] Rename "getdatabaseencoding()" to "pg_database_encoding()", and document