Re: anonymous composite types for Table Functions (aka SRFs)
От
Tom Lane
Тема
Re: anonymous composite types for Table Functions (aka SRFs)
Дата
Msg-id
21232.1027955020@sss.pgh.pa.us
Ответ на
Re: anonymous composite types for Table Functions (aka SRFs) (nconway@klamath.dyndns.org (Neil Conway))
Список
Дерево обсуждения
Re: anonymous composite types for Table Functions (aka Joe Conway <mail@joeconway.com>
nconway@klamath.dyndns.org (Neil Conway) writes: >> 1. Creates a new pg_type typtype: 'p' for pseudo type (currently either >> 'b' for base or 'c' for catalog, i.e. a class). > I think you mentioned that typtype could be renamed to typkind -- that > sounds good to me... It sounds like a way to break client-side code for little gain to me... > Is there a reason why you can't specify the return type in the function > declaration? ISTM that for most functions, the 'AS' clause will be the > same for every usage of the function. The particular functions Joe is worried about (dblink and such) do not have a fixed return type. In any case that would be a separate mechanism with its own issues, because we'd have to store the anonymous type in the system catalogs. >> SELECT * from foo(sqlstmt) AS f(f1 int, f2 text, f3 timestamp) > What does the 'f' indicate? It's required by the SQL alias syntax. >> SELECT * from foo(sqlstmt) f(f1 int, f2 text, f3 timestamp) > This form of the syntax seems a bit unclear, IMHO. It seems a bit > like two function calls. Can the 'AS' be made mandatory? Why? That just deviates even further from the spec syntax. regards, tom lane
В списке pgsql-patches по дате отправления
От: nconway@klamath.dyndns.org (Neil Conway)
Дата:
От: nconway@klamath.dyndns.org (Neil Conway)
Дата: