public inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
To: Robert Haas <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: more elogs hit by sqlsmith (Re: amvalidate(): cache lookup failed for operator class 123)
Date: Wed, 12 Apr 2023 16:40:20 -0500
Message-ID: <ZDclRM/[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<CA+Tgmob8RSX3RzZ1uMBKKyMsMEZx0J51Pi213Mko6t8Fm4mMgg@mail.gmail.com>
<[email protected]>
On Mon, Feb 13, 2023 at 07:50:53AM -0600, Justin Pryzby wrote:
> On Thu, May 13, 2021 at 12:01:22PM -0500, Justin Pryzby wrote:
> > postgres=# select amvalidate(123);
> > ERROR: cache lookup failed for operator class 123
> > The usual expectation is that sql callable functions should return null rather
> > than hitting elog().
>
> On Thu, May 13, 2021 at 2:22 PM Tom Lane <[email protected]> wrote:
> > Meh. I'm not convinced that that position ought to apply to amvalidate.
>
> On Thu, May 13, 2021 at 04:12:10PM -0400, Robert Haas wrote:
> > I am still of the opinion that we ought to apply it across the board,
> > for consistency. It makes it easier for humans to know which problems
> > are known to be reachable and which are thought to be can't-happen and
> > thus bugs. If we fix cases like this to return a real error code, then
> > anything that comes up as XX000 is likely to be a real bug, whereas if
> > we don't, the things that we're not concerned about have to be
> > filtered out by some other method, probably involving a human being.
> > If the filter that human being has to apply further involves reading
> > Tom Lane's mind and knowing what he will think about a particular
> > report, or alternatively asking him, it just makes complicated
> > something that we could have made simple.
>
> FWIW, here are some other cases from sqlsmith which hit elog()/XX000:
>
> postgres=# select unknownin('');
> ERROR: failed to find conversion function from unknown to text
> postgres=# \errverbose
> ERROR: XX000: failed to find conversion function from unknown to text
> LOCATION: coerce_type, parse_coerce.c:542
>
> postgres=# SELECT pg_catalog.interval( '12 seconds'::interval ,3);
> ERROR: unrecognized interval typmod: 3
>
> postgres=# SELECT pg_describe_object(1,0,1);
> ERROR: invalid non-zero objectSubId for object class 1
>
> postgres=# SELECT pg_read_file( repeat('a',333));
> ERROR: could not open file "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" for reading: File name too long
postgres=# SELECT acldefault('a',0);
ERROR: unrecognized object type abbreviation: a
postgres=# SELECT setweight('a','1');
ERROR: unrecognized weight: 49
regression=# select float8_regr_intercept(ARRAY[1]) ;
ERROR: float8_regr_intercept: expected 6-element float8 array
None of these is new in v16.
view thread (3+ 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], [email protected], [email protected]
Subject: Re: more elogs hit by sqlsmith (Re: amvalidate(): cache lookup failed for operator class 123)
In-Reply-To: <ZDclRM/[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