Re: regdatabase
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Greg Sabino Mullane <htamfids@gmail.com>
Cc: Ian Lawrence Barwick <barwick@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-05-08T03:41:23Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add new OID alias type regdatabase.
- bd09f024a1bb 19 (unreleased) landed
-
pg_upgrade: Preserve database OIDs.
- aa01051418f1 15.0 cited
Attachments
- v3-0001-Add-regdatabase.patch (text/plain)
On Wed, May 07, 2025 at 10:29:43AM -0400, Greg Sabino Mullane wrote:
> On Wed, May 7, 2025 at 4:55 AM Ian Lawrence Barwick <barwick@gmail.com>
> wrote:
>> Version which applies/builds against current HEAD attached. I haven't yet
>> had a chance to look at the code beyond fixing it, however.
I spent some time on this one. I saw two main things:
* As of commit aa01051, pg_upgrade does preserve database OIDs, so we don't
need to block for tables with columns of type regdatabase.
* Some of the regproc.c code needs to use the soft error functions instead.
I believe both of these were introduced after you wrote your original patch
in 2020. There have been a couple of refactors, too. The attached patch
should address everything I've mentioned.
> Would be nice to have test coverage of our special "single dash" case, e.g.
>
> select regdatabase('-')::oid;
> 0
Yeah, I'm not sure there's any coverage of that for the existing reg*
types, either.
--
nathan