Re: FailedAssertion("!OidIsValid(def->collOid)", File: "view.c",Line: 89) - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: FailedAssertion("!OidIsValid(def->collOid)", File: "view.c",Line: 89)
Date
Msg-id CA+hUKGKrs_9Y-+3mYFHnABwPGaWPJLHKWwS2TU0f-NXSc-yjKg@mail.gmail.com
Whole thread Raw
In response to Re: FailedAssertion("!OidIsValid(def->collOid)", File: "view.c",Line: 89)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Wed, Jun 3, 2020 at 9:30 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> On 2019-Dec-02, Thomas Munro wrote:
> > On Mon, Dec 2, 2019 at 12:32 PM Manuel Rigger <rigger.manuel@gmail.com> wrote:
> > > CREATE TABLE t0(c0 TEXT COLLATE "POSIX");
> > > CREATE VIEW v0(c0) AS (SELECT (t0.c0 COLLATE "C")::INT FROM t0); --
> > > FailedAssertion("!OidIsValid(def->collOid)", File: "view.c", Line: 89)
> > >
> > > When building without assertions, the CREATE VIEW statement results in
> > > an error instead:
> > >
> > > ERROR: collations are not supported by type integer
> >
> > I think the options are to add a check and ereport() instead of an
> > assertion, or just remove the assertion and let BuildDescForRelation()
> > report the error as it does in non-assert builds.  I think the latter
> > is better, since it seems well established that BuildDescForRelation()
> > will complain about that via its call to GetColumnDefCollation().
> > Here's a patch to do that.
>
> This has not been applied yet AFAICS.  Thomas, are you getting to this
> one soon?

Thanks for the reminder.  Will do.



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16475: mess up my laptop
Next
From: Tom Lane
Date:
Subject: Re: Explicit deterministic COLLATE fails with pattern matching operations on column with non-deterministic collation