returning SETOF RECORD

Поиск
Список
Период
Сортировка
От Robert Haas
Тема returning SETOF RECORD
Дата
Msg-id CA+TgmoazghfbqPXdM1X5TiG3ZS74aAJnfAMPmy2m768Li5DqJw@mail.gmail.com
обсуждение исходный текст
Ответы Re: returning SETOF RECORD  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
populate_record_worker in jsonfuncs.c says this:
       if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)           ereport(ERROR,
 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),                    errmsg("function returning record called in context "
                    "that cannot accept type record"),                    errhint("Try calling the function in the FROM
clause"                            "using a column definition list.")));
 

dblink.c has a similar incantation.

Is there any reasonable alternative?  That is, if you have a function
returning SETOF record, and the details of the record type aren't
specified, is there anything you can do other than error out like
this?

Thanks,

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Pg_upgrade and toast tables bug discovered
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Minmax indexes