Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZNBve-0005SN-3a for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Aug 2015 03:33:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZNBvd-0000pJ-Lj for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Aug 2015 03:33:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNBvc-0000ol-VN for pgsql-bugs@postgresql.org; Thu, 06 Aug 2015 03:33:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNBva-0004jf-2R for pgsql-bugs@postgresql.org; Thu, 06 Aug 2015 03:33:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t763X11n031182; Wed, 5 Aug 2015 23:33:01 -0400 From: Tom Lane To: "David G. Johnston" cc: Maciek Sakrejda , "pgsql-bugs@postgresql.org" Subject: Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list In-reply-to: References: <20150806005721.855.4383@wrigleys.postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Wed, 05 Aug 2015 20:21:31 -0700" Date: Wed, 05 Aug 2015 23:33:01 -0400 Message-ID: <31181.1438831981@sss.pgh.pa.us> X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "David G. Johnston" writes: > On Wed, Aug 5, 2015 at 5:57 PM, wrote: >> maciek=# with foo(a) as (select 1) select (select (foo) from foo).* from >> foo; >> ERROR: record type has not been registered > ​Suggestions are welcomed though this is an existing limitation of > PostgreSQL. The planner does not capture enough information to deal with > constructs of the form (ROW(...)).* ​ > regardless of how they were formed. The above is the equivalent to: > SELECT (foo.foo_val).* FROM ( VALUES (ROW(1)) ) foo (foo_val) which is > likewise unresolvable. > ​Something like: "wildcard expansion of uncataloged ​record type not > possible" ? It's a bug IMO. The reason the error message is not very transparent is that it's not meant to ever be seen by users. Hence, improving the wording would just be putting lipstick on the wrong end of a pig. regards, tom lane (But having said that, I've not looked into how hard it'd be to fix this particular case...) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs