public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alexander Lakhin <[email protected]>
To: Bertrand Drouvot <[email protected]>
To: Michael Paquier <[email protected]>
Cc: [email protected]
Subject: Re: Avoid orphaned objects dependencies, take 3
Date: Sun, 19 May 2024 11:00:00 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<Zjy/o3t/[email protected]>
<[email protected]>
<[email protected]>
Hello Bertrand,
15.05.2024 11:31, Bertrand Drouvot wrote:
> On Wed, May 15, 2024 at 10:14:09AM +0900, Michael Paquier wrote:
>
>> + if (object_description)
>> + ereport(ERROR, errmsg("%s does not exist", object_description));
>> + else
>> + ereport(ERROR, errmsg("a dependent object does not ex
>>
>> This generates an internal error code. Is that intended?
> Yes, it's like when say you want to create an object in a schema that does not
> exist (see get_namespace_oid()).
AFAICS, get_namespace_oid() throws not ERRCODE_INTERNAL_ERROR,
but ERRCODE_UNDEFINED_SCHEMA:
# SELECT regtype('unknown_schema.type');
ERROR: schema "unknown_schema" does not exist
LINE 1: SELECT regtype('unknown_schema.type');
^
# \echo :LAST_ERROR_SQLSTATE
3F000
Probably, it's worth to avoid ERRCODE_INTERNAL_ERROR here in light of [1]
and [2], as these errors are not that abnormal (not Assert-like).
[1] https://www.postgresql.org/message-id/Zic_GNgos5sMxKoa%40paquier.xyz
[2] https://commitfest.postgresql.org/48/4735/
Best regards,
Alexander
view thread (13+ messages) latest in thread
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], [email protected], [email protected]
Subject: Re: Avoid orphaned objects dependencies, take 3
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