Re: Failed Assertion about PolymorphicType - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Failed Assertion about PolymorphicType
Date
Msg-id 1070.1586035267@sss.pgh.pa.us
Whole thread Raw
In response to Failed Assertion about PolymorphicType  (Jaime Casanova <jaime.casanova@2ndquadrant.com>)
List pgsql-hackers
Jaime Casanova <jaime.casanova@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Failed Assertion about PolymorphicType
Next
From: Thomas Munro
Date:
Subject: Re: backup manifests and contemporaneous buildfarm failures