Re: pg_get_databasebyid(oid)

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, alexey(dot)lesovsky(at)dataegret(dot)com
Subject: Re: pg_get_databasebyid(oid)
Date: 2019-08-28 12:49:40
Message-ID: CALtqXTcX2nEbQXdr4nD6B62J3DvRw9DMvxEw6L0ZnAQdprs40g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 28, 2019 at 5:38 PM Sergei Kornilov <sk(at)zsrv(dot)org> wrote:

> Hello
> We already have function pg_get_userbyid(oid) with lookup in pg_authid
> catalog. My collegue ask me can we add similar function
> pg_get_databasebyid(oid) with lookup in pg_databases.
> It is simple function to get a database name by oid and fallback to
> 'unknown (OID=n)' if missing.
>
> The proposed patch is attached. Currently I missed the tests - I doubt
> which file in src/test/regress/sql/ is the most suitable. pg_get_userbyid
> is called from privileges.sql only.
>
> regards, Sergei

Please add that to commitfest.

--
Ibrar Ahmed

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2019-08-28 13:05:07 Re: pg_get_databasebyid(oid)
Previous Message Sergei Kornilov 2019-08-28 12:38:42 pg_get_databasebyid(oid)