(SETOF) RECORD AS complex_type

Поиск
Список
Период
Сортировка
От David Fetter
Тема (SETOF) RECORD AS complex_type
Дата
Msg-id 20061227220638.GD22284@fetter.org
обсуждение исходный текст
Ответы Re: (SETOF) RECORD AS complex_type  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: (SETOF) RECORD AS complex_type  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
Folks,

While using DBI-Link, I've noticed a little lacuna in how functions
returning (SETOF) RECORD work, namely, that you have to cast them to
explicit lists of columns, even when that list of columns corresponds
to an existing complex type.

What would be involved in fixing the casting operation so that the
following would work?

CREATE TYPE foo AS (   a INT4,   b INT8,   c POINT,   d TEXT
);

CREATE FUNCTION bar(output_type TEXT)
RETURNS SETOF RECORD
...

SELECT * FROM bar('foo') AS foo;

Cheers,
D
-- 
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pg_hba.conf hostname todo
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Per-database search_path