Re: BUG #17067: FailedAssertion at castNodeImpl - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17067: FailedAssertion at castNodeImpl
Date
Msg-id 1641484.1624282409@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17067: FailedAssertion at castNodeImpl  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: BUG #17067: FailedAssertion at castNodeImpl
List pgsql-bugs
David Rowley <dgrowleyml@gmail.com> writes:
> On Mon, 21 Jun 2021 at 20:15, PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> run the following sql command through client and the PostgreSQL database
>> process will crash:

> Thanks for the report.  It looks like a thinko in 1d581ce71.   Code
> was added there which insists the initial list element is a List, but
> it's an IntList.  I think the code should just use linitial instead of
> linitial_node.

Hmm, if it's an int-list then the subsequent dup-elimination loop is
also wrong, and for that matter I don't think the preceding lines
would have worked.

> I'm quite surprised that we don't have a test that picks this up.

The code coverage report shows that we *do* have tests that run
through this code, so the existing typing is okay in the test cases
we have.  I'm guessing the real problem is that something upstream is
generating the wrong type of list in this example.

            regards, tom lane



pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #17067: FailedAssertion at castNodeImpl
Next
From: David Rowley
Date:
Subject: Re: BUG #17067: FailedAssertion at castNodeImpl