> So, does anyone know of (or have) good examples of queries within> functions (and returning sets of data)?
I'm not very experienced in PostgreSQL but maybe SPI functions is what youneed.
Regards,Ntinos Katsaros