Search Postgresql Archives

FUNCTION taking a record; returning a record?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux