Обсуждение: FUNCTION taking a record; returning a record?

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

FUNCTION taking a record; returning a record?

От
InterRob
Дата:
Dear list,

I wrote a function that takes one parameter of a certain 'table type':

CREATE FUNCTION deserialize(serTable table1) RETURNS record AS ... 

I whish to use this function in a query such as:

SELECT deser.* FROM deserialize(table1) deser(col1 integer, col2 integer), table1 WHERE table1.field > [some_value]

Thus: have the function perform its operation on a SUBSET of table1, RETURNING multiple fields.

I can't quite figure out how to put this together (other than passing the table name and where-clause as TEXT)...

Any ideas? They are very much appreciated.

Regards,


Rob