Re: regdatabase

2025-05-07 Thread Ian Lawrence Barwick
c/src/sgml/datatype.sgml index 09309ba0390..cab8f0fda93 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -4737,6 +4737,10 @@ INSERT INTO mytable VALUES(-1); -- fails regconfig + +regdatabase + + regdictionary @@ -4878,6 +4882,13 @@ SEL

Re: regdatabase

2025-05-06 Thread Tom Lane
Nathan Bossart writes: > * Would anyone object if I put together some patches to add regdatabase? The original concept of the reg* types was to implement lookups for cases that are more complicated than "(SELECT oid FROM pg_foo WHERE fooname = 'whatever')". As an example

Re: regdatabase

2025-05-06 Thread Nathan Bossart
On Wed, May 07, 2025 at 08:45:15AM +0900, Michael Paquier wrote: > For regdatabase, there would be at least two simplications related to > the dump of subscriptions, where we could switch the queries to the > new grammar for backend versions able to support the new grammar, > meaning t

Re: regdatabase

2025-05-06 Thread Nathan Bossart
On Wed, May 07, 2025 at 09:18:28AM +0900, Ian Lawrence Barwick wrote: > Hah, I put together a patch to implement just that a while back, but > then concluded > for some reason that it would likely be rejected so saved myself the > humiliation of > submitting it... > > Attaching patch for reference

Re: regdatabase

2025-05-06 Thread Ian Lawrence Barwick
2025年5月7日(水) 4:29 Nathan Bossart : > > 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 th

Re: regdatabase

2025-05-06 Thread Michael Paquier
On Wed, May 07, 2025 at 07:28:02AM +0900, Tatsuo Ishii wrote: > I think regdatabase is a good idea. I've also found your reference from the lists of 2019 to be the only one referring to a regdatabase. If it means that I will type less by not having to do joins with pg_database, count me

Re: regdatabase

2025-05-06 Thread Tatsuo Ishii
> 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 tw

regdatabase

2025-05-06 Thread Nathan Bossart
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: * I