public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Ashutosh Bapat <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: some validate_relation_kind() tidying
Date: Mon, 23 Feb 2026 17:44:07 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAExHW5v9LTRuqqjS-N5g0n+cwGJLSf9+73ACgy4vFVzgzFb36A@mail.gmail.com>
References: <[email protected]>
<CAExHW5v9LTRuqqjS-N5g0n+cwGJLSf9+73ACgy4vFVzgzFb36A@mail.gmail.com>
On 19.02.26 09:48, Ashutosh Bapat wrote:
> The || should be &&. The bug shows up as an initdb failure
> running bootstrap script ... 2026-02-19 14:06:43.411 IST [197482]
> FATAL: cannot open relation "pg_type"
> 2026-02-19 14:06:43.411 IST [197482] DETAIL: This operation is not
> supported for tables.
>
> I think this is more future-proof. If a relkind gets added and needs
> to be in this list, we will notice it from the error. I think we
> should avoid mentioning specific relkinds in the comment as well since
> that list will need to be updated as the set of relkinds changes. Just
> mentioning the criteria should be enough. I have slightly improved the
> comment in the attached 0003.
>
>> Secondly, the sequence.c one was probably copied from the table.c one,
>> but I think we can make the error message a bit more direct by just
>> saying "... is not a sequence" instead of "cannot open relation".
>>
>
> +1.
>
>> These are the two attached patches. This is just something I found
>> while working on something else nearby.
>
> Attached are your two patches + bug fix in 0002 + my suggestions in 0003.
Thanks, committed with your fixes. (I fine-tuned the comment in patch
0003 a bit further, since arguably you can "reference" a composite type
in a query.)
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: some validate_relation_kind() tidying
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox