On Sun, Nov 20, 2005 at 06:05:36PM +0100, Pavel Stehule wrote:
> what is difference between rows with different structures and tables?
> Tables are more logic. But I unlike function which returns setof tables.
> This need data type table. I prefere normal clasic solution.
You're confusing syntax with implementation. Internally the functions
would return a single tuple at a time. But there is no real reason why:
return table (select * from foo);
would not simply loop and return each tuple. We can create syntax as we
feel appropriate if we think it makes thing easier. Thus internally
your two variants would both work and do the same thing. Look at the
SQL language functions. There if you say 'select * from foo' it returns
the whole table without a loop...
Anyway, this discussion isn't really going to go anywhere without some
code. I'll see what I can do.
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.