Re: Failure to coerce unknown type to specific type - Mailing list pgsql-bugs

From Jeff Davis
Subject Re: Failure to coerce unknown type to specific type
Date
Msg-id 1430675419.2464.0.camel@jeff-desktop
Whole thread Raw
In response to Re: Failure to coerce unknown type to specific type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Sun, 2015-05-03 at 13:00 -0400, Tom Lane wrote:
> I don't think there's any useful alternative to failing on this type of
> case.  You can't realistically postpone resolution of the subquery output
> types long enough for outer-level expression resolution to provide
> context.  Even if you could, the behavior wouldn't be very well defined,
> because (as you note) there might be more than one such expression leading
> to contradictory results.
>
> I think it's reasonable to try to let context inform resolution of the
> subquery output types where there is exactly one immediate source of
> context, such as the INSERT/SELECT case or UNION/INTERSECT/EXCEPT cases.
> (Upthread, Kevin whines about our handling of UNION, but that's possibly
> fixable.)

OK, your proposal sounds good to me then.

Regards,
    Jeff Davis

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Failure to coerce unknown type to specific type
Next
From: Kevin Grittner
Date:
Subject: Re: Failure to coerce unknown type to specific type