Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list
Дата
Msg-id 31181.1438831981@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-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...)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #13539: ERROR: record type has not been registered with CTE and subselect in target list
Следующее
От: sathish kumar
Дата:
Сообщение: Re: BUG #13525: Database crashed with several error messages "Could not open file "pg_multixact/members/"