Search Postgresql Archives

Re: Order of rows in simple "select r from table_fn()"

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

 



Hi
 
It adds an uncomfortable amount of clutter.

* Is it essential for correctness? *

It's annoying that the use of "return next" prevents the pattern that each "print line" follows from being encapsulated into a procedure. But it is what it is, yes?

RETURN NEXT, RETURN QUERY (RETURN QUERY is +/- RETURN NEXT) materializes result in tuple store. This can be a source of performance problems sometimes (SELECT * FROM fc() LIMIT n) , but you can believe in persistent order. Order of reading from the tuple store is exactly like reading from a file, and there are not any other processes that can modify the order of reading (tuple store is not visible from other processes). I can imagine different mechanisms in the future - without materialization based on pipes - but it is a very far future, and still there will not be a reason for change of order.

Regards

Pavel





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux