Re: Foreign Database Connectivity
От | Tom Lane |
---|---|
Тема | Re: Foreign Database Connectivity |
Дата | |
Msg-id | 29947.1050523325@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Foreign Database Connectivity (mlw <pgsql@mohawksoft.com>) |
Ответы |
Re: Foreign Database Connectivity
Re: Foreign Database Connectivity |
Список | pgsql-hackers |
mlw <pgsql@mohawksoft.com> writes: > How about this: (a varient) > CREATE [OR REPLACE] FUNCTION name (args) > RETURNS setof (mycol1 integer, mycol2 varchar) > LANGUAGE langname > ..... > WITH (attribute, param1='param1', param2='param2',...) > Now, what would be cool, is if there was a way for the RETURNS specifier > to be passed to the function in some easy to use preparsed form. Just create a rowtype and declare the function as returning that. With Joe's recent additions for polymorphic functions, it's even possible for the function to discover what it's supposed to return at runtime. (Hey Joe, did we make that work for functions called from the FROM clause? If not, seems like something to fix up.) > The "WITH" attributes could provide one more attribute, a parameter > which could be passed to the function. Actually, the way that you probably ought to build it is as a new PL language type. All the stuff you are thinking of as WITH parameters would be inside the "function body" in some trivial syntax. I think this could likely even be built in 7.3, without the polymorphic functions (PL handlers are already polymorphic ...) regards, tom lane
В списке pgsql-hackers по дате отправления: