• Tom Lane's avatar
    Remove bogus assertion about polymorphic SQL function result. · 9d9784c8
    Tom Lane authored
    It is possible to reach check_sql_fn_retval() with an unresolved
    polymorphic rettype, resulting in an assertion failure as demonstrated
    by one of the added test cases.  However, the code following that
    throws what seems an acceptable error message, so just remove the
    Assert and adjust commentary.
    
    While here, I thought it'd be a good idea to provide some parallel
    tests of SQL-function and PL/pgSQL-function polymorphism behavior.
    Some of these cases are perhaps duplicative of tests elsewhere,
    but we hadn't any organized coverage of the topic AFAICS.
    
    Although that assertion's been wrong all along, it won't have any
    effect in production builds, so I'm not bothering to back-patch.
    
    Discussion: https://postgr.es/m/21569.1584314271@sss.pgh.pa.us
    9d9784c8
polymorphism.out 46.1 KB