Re: ERROR: record type has not been registered

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: record type has not been registered
Дата
Msg-id 9073.1262556393@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ERROR: record type has not been registered  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> This was a random attempt to figure something out about min/max on row
> types:

> => select min(a) from (values (row(1,2,3)), (row(3,4,5))) as x(a);
> ERROR:  42809: record type has not been registered
> LOCATION:  lookup_rowtype_tupdesc_internal, typcache.c:341

> I don't know whether it's supposed to work, but the error message
> doesn't help much.  Perhaps room for improvement?

Hmm.  It's not going to work because there is no min(record) aggregate.
However, it's failing before it figures that out.  The problem seems
to be in expandRecordVariable:
           /*            * This case should not occur: a column of a table or values list            * shouldn't have
typeRECORD.  Fall through and fail (most            * likely) at the bottom.            */
 

The comment is correct that we don't allow nameless record types as
columns of real tables.  Maybe we need to disallow them as columns of
VALUES, too.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: ERROR: record type has not been registered
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_migrator issues