Обсуждение: Function return tuples

Поиск
Список
Период
Сортировка

Function return tuples

От
Werachart Jantarataeme
Дата:
I am start programming on Postgres and looking for how to return a set of
tuples for a function;

As see on man pages of "create_function", there is an example of function
hobbies which return "set of HOBBIES".

example:
 create function hobbies (EMP) returns set of HOBBIES
          as 'select (HOBBIES.all) from HOBBIES
               where $1.name = HOBBIES.person'
          language 'sql'
result:
  ERROR:  parser: parse error at or near "set".

An on last line of the man pages said "C functions cannot return a set of
values." Is there this fix on lastest version 6.5beta1?

WChart.