Re: regdatabase - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: regdatabase
Date
Msg-id 20250507.072802.141594448236275664.ishii@postgresql.org
Whole thread Raw
In response to regdatabase  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: regdatabase
List 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...")?

I always do "SELECT oid FROM pg_database...". I have no idea other way.

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

I think regdatabase is a good idea.

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Shayon Mukherjee
Date:
Subject: Prolonged truncation phase during vacuum on toast table with repeated interruptions by lock waiters and a proposed POC patch
Next
From: Michael Paquier
Date:
Subject: Re: Large expressions in indexes can't be stored (non-TOASTable)