From: | Ian Lawrence Barwick <barwick(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Greg Sabino Mullane <htamfids(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: regdatabase |
Date: | 2025-05-08 13:38:04 |
Message-ID: | CAB8KJ=gRhX9yz83gxaUx8POMBQWi-vFTxcZ1yfNMkqw18DktJw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2025年5月8日(木) 12:41 Nathan Bossart <nathandbossart(at)gmail(dot)com>:
>
> 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(at)gmail(dot)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.
Thanks for looking at that, I likely wouldn't have got to it for a
couple of days.
> > 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.
Revised patch attached which adds coverage of that and also for the
"constant of the type reg(role|database) cannot be used here" error.
Regards
Ian Barwick
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Add-regdatabase.patch | text/x-patch | 22.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-05-08 13:49:37 | Re: disabled SSL log_like tests |
Previous Message | Álvaro Herrera | 2025-05-08 13:17:17 | Re: Valgrind - showing memory leaks |