Re: Reject invalid databases in pg_get_database_ddl()

From: Japin Li <japinli(at)hotmail(dot)com>
To: "Euler Taveira" <euler(at)eulerto(dot)com>
Cc: "Amit Langote" <amitlangote09(at)gmail(dot)com>, "Lakshmi N" <lakshmin(dot)jhs(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Subject: Re: Reject invalid databases in pg_get_database_ddl()
Date: 2026-04-17 02:30:44
Message-ID: SY7PR01MB10921A7CBE85FBD6C670BB5F4B6202@SY7PR01MB10921.ausprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 16 Apr 2026 at 22:46, "Euler Taveira" <euler(at)eulerto(dot)com> wrote:
> On Thu, Apr 16, 2026, at 8:46 PM, Amit Langote wrote:
>>
>> Thanks. Will push the attached shortly.
>>
>
> I think the errhint() is excessive in this context. It makes sense if you are
> executing ALTER DATABASE, for example. I suggest a message like
>
> database \"%s\" is an invalid database
>
> Regarding the test case suggested by Japin Li, I don't think it is worth because
> it is a transient state (unless something bad happened and pg_database contains
> a dangling row.)
>

Thanks for clarifying. Got it.

--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hu Xunqi 2026-04-17 02:49:26 Re: Reject invalid databases in pg_get_database_ddl()
Previous Message Amit Langote 2026-04-17 02:15:39 Re: Reject invalid databases in pg_get_database_ddl()