pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Maciek Sakrejda <maciek@heroku.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list
Date: Wed, 05 Aug 2015 23:33:01 -0400
Message-ID: <31181.1438831981@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwZ9jkP8YQH36Cpwc8aTWwrMwUkawHqYx3Tik9tmTVZszA@mail.gmail.com>
References: <20150806005721.855.4383@wrigleys.postgresql.org>
	<CAKFQuwZ9jkP8YQH36Cpwc8aTWwrMwUkawHqYx3Tik9tmTVZszA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Aug 5, 2015 at 5:57 PM, <maciek@heroku.com> 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



view thread (3+ messages)

Message-ID: <31181.1438831981@sss.pgh.pa.us>
Permalink:  ../31181.1438831981@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31181.1438831981@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, maciek@heroku.com
  Subject: Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list
  In-Reply-To: <31181.1438831981@sss.pgh.pa.us>
  References: <20150806005721.855.4383@wrigleys.postgresql.org> <CAKFQuwZ9jkP8YQH36Cpwc8aTWwrMwUkawHqYx3Tik9tmTVZszA@mail.gmail.com> <31181.1438831981@sss.pgh.pa.us>

* 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