Re: Proposal: anonymous composite types for Table Functions (aka SRFs)

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Proposal: anonymous composite types for Table Functions (aka SRFs)
Дата
Msg-id GNELIHDDFBOCMGBFGEFOIEFECDAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Proposal: anonymous composite types for Table Functions (aka SRFs)  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
> 3. Modify FROM clause grammer to accept something like:
>     SELECT * FROM my_func() AS mtf(colname1 type1, colname2 type1, ...)
> where mtf is the table alias, colname1, etc are the column names, and
> type1, etc are the column types.

...

> Now when creating a function you can do:
>    CREATE FUNCTION foo(text) RETURNS setof RECORD ...
>
> And when using it you can do, e.g.:
>    SELECT * from foo(sqlstmt) AS (f1 int, f2 text, f3 timestamp)

Why is there the requirement to declare the type at SELECT time at all?  Why
not just take what you get when you run the function?

Chris



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

Предыдущее
От: Yuva Chandolu
Дата:
Сообщение: savepoint and rollback queries in postgres
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: RESET SESSION AUTHORIZATION