Re: Do Layered Views/Relations Preserve Sort Order ?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Do Layered Views/Relations Preserve Sort Order ?
Дата
Msg-id CA+TgmoYC6GD8sWUKCY57gF8SZWjK--SWBQSwgCxUYKEbbCkt-w@mail.gmail.com
обсуждение исходный текст
Ответ на Do Layered Views/Relations Preserve Sort Order ?  (Charles Sheridan <cesheri@swbell.net>)
Список pgsql-hackers
On Wed, Sep 9, 2015 at 7:53 PM, Charles Sheridan <cesheri@swbell.net> wrote:
> When there are several views defined on top of each other, are SELECTs on
> views that do not specify a SORT order guaranteed to preserve the cumulative
> sort order of the lower-level views ?
>
> Is the answer true for any arbitrarily large set of layered views?
>
> Is the answer the same if the layers of relations are a mix of views and
> tables ?

If a view definition includes an ORDER BY clause, the output of that
view will be sorted accordingly.  But if you do something with that
output, like join it to another table, then the join might disturb the
sort order.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Latent cache flush hazard in RelationInitIndexAccessInfo
Следующее
От: Robert Haas
Дата:
Сообщение: Re: RLS open items are vague and unactionable