Re: Function returns composite type
От | Joe Conway |
---|---|
Тема | Re: Function returns composite type |
Дата | |
Msg-id | 3EE61712.8@joeconway.com обсуждение исходный текст |
Ответ на | Re: Function returns composite type (Teodor Sigaev <teodor@sigaev.ru>) |
Ответы |
Re: Function returns composite type
|
Список | pgsql-hackers |
Teodor Sigaev wrote: > Ok, RECORD was a keyword, thank you. But I have questions: > 1 What do you mean SRF? Set Return Function? It refers to functions returning one or more tuples. From a practical standpoint, it is a function that is (and must be) used in the FROM clause like a table (hence also known as a "table function"). > # select * from qqn(1,2) as c(qq int4, qq1 int4);> qq | qq1> ----+-----> 1 | 2> (1 row)> > It works fine. But is there way not to point 'as c(qq int4, qq1 int4)'? If you mean, is there a way to leave out the 'as c(qq int4, qq1 int4)', the answer is no. You need to either declare the function to return a determinate data type, or you have to specify the data type at runtime in the query string. Joe
В списке pgsql-hackers по дате отправления: