pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Postgres-Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Failure to coerce unknown type to specific type
Date: Sun, 03 May 2015 10:50:19 -0700
Message-ID: <1430675419.2464.0.camel@jeff-desktop> (raw)
In-Reply-To: <16364.1430672448@sss.pgh.pa.us>
References: <CAMp0ubdECGUJWpQKyUM36PxQWoKe0VfTbHGHgn+w2H_5q1Nmow@mail.gmail.com>
	<1430.1428543112@sss.pgh.pa.us>
	<CA+Tgmoav4gswNkA39SYdb3SdSBfrcHmU08=nXLNbxMZFg7UYsw@mail.gmail.com>
	<35651.1430347071@sss.pgh.pa.us>
	<1430459450.2499.17.camel@jeff-desktop>
	<CA+TgmoaUNFTvUnmV3Fj+kK-TyjVN_S0zNSD_hMBYP8kMCo1d3g@mail.gmail.com>
	<37798.1430500134@sss.pgh.pa.us>
	<1430603756.2499.44.camel@jeff-desktop>
	<16364.1430672448@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (42+ messages)  latest in thread

Message-ID: <1430675419.2464.0.camel@jeff-desktop>
Permalink:  ../1430675419.2464.0.camel@jeff-desktop/
Also on:    postgresql.org/message-id/1430675419.2464.0.camel@jeff-desktop

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pgsql@j-davis.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com
  Subject: Re: Failure to coerce unknown type to specific type
  In-Reply-To: <1430675419.2464.0.camel@jeff-desktop>
  References: <CAMp0ubdECGUJWpQKyUM36PxQWoKe0VfTbHGHgn+w2H_5q1Nmow@mail.gmail.com> <1430.1428543112@sss.pgh.pa.us> <CA+Tgmoav4gswNkA39SYdb3SdSBfrcHmU08=nXLNbxMZFg7UYsw@mail.gmail.com> <35651.1430347071@sss.pgh.pa.us> <1430459450.2499.17.camel@jeff-desktop> <CA+TgmoaUNFTvUnmV3Fj+kK-TyjVN_S0zNSD_hMBYP8kMCo1d3g@mail.gmail.com> <37798.1430500134@sss.pgh.pa.us> <1430603756.2499.44.camel@jeff-desktop> <16364.1430672448@sss.pgh.pa.us> <1430675419.2464.0.camel@jeff-desktop>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox