Re: Order of rows in simple "select r from table_fn()"
| От | Pavel Stehule |
|---|---|
| Тема | Re: Order of rows in simple "select r from table_fn()" |
| Дата | |
| Msg-id | CAFj8pRAWmh5Xz8X8aoKO87_JSbN-UM_mjj92x+5yveSBxms6SQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Order of rows in simple "select r from table_fn()" (Bryn Llewellyn <bryn@yugabyte.com>) |
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: