regdatabase

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: regdatabase
Date: 2025-05-06 19:29:42
Message-ID: aBpjJhyHpM2LYcG0@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Every once in a while, I find myself wanting to use regdatabase for
something like current_database()::regdatabase, and I'm always surprised
when I inevitably rediscover that it doesn't exist. I only found one
reference to the idea in the archives [0]. So, I have two questions:

* Is there an easier way to get the current database's (or any database's)
OID that I am overlooking (besides "SELECT oid FROM pg_database...")?

* Would anyone object if I put together some patches to add regdatabase?

[0] https://postgr.es/m/20191109220939.jz55zcc33d3g7h7b%40alap3.anarazel.de

--
nathan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2025-05-06 19:42:10 Re: queryId constant squashing does not support prepared statements
Previous Message Sami Imseih 2025-05-06 18:32:48 Re: queryId constant squashing does not support prepared statements