Re: Failed Assertion about PolymorphicType

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Failed Assertion about PolymorphicType
Date: 2020-04-04 21:21:07
Message-ID: 1070.1586035267@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com> writes:
> Running sqlsmith on master i got an assertion failure on parse_coerce.c:2049

Hmph, or more simply:

regression=# select array_in('{1,2,3}',23,-1);
server closed the connection unexpectedly

which is a case that worked before. The core of the problem is
that array_in() violates the assumption that a polymorphic result
requires a polymorphic argument:

regression=# \df array_in
List of functions
Schema | Name | Result data type | Argument data types | Type
------------+----------+------------------+-----------------------+------
pg_catalog | array_in | anyarray | cstring, oid, integer | func
(1 row)

I see that enforce_generic_type_consistency did not use to assert
that it'd resolved every polymorphic rettype. So I think we should just
remove that assertion (and fix the incorrect comment that led to
adding it).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2020-04-04 21:54:11 Re: backup manifests and contemporaneous buildfarm failures
Previous Message Jaime Casanova 2020-04-04 21:03:52 Failed Assertion about PolymorphicType