Re: upgrade 8.1.4 -> latest, sort order subquery

Поиск
Список
Период
Сортировка
Искать
От
Michael Glaesemann
Тема
Re: upgrade 8.1.4 -> latest, sort order subquery
Дата
Msg-id
07506C82-FBBB-40B0-A872-AD67DFB6F1E0@seespotcode.net
Ответ на
Список
Дерево обсуждения
upgrade 8.1.4 -> latest, sort order subquery jef peeraer <jef.peeraer@telenet.be>
Re: upgrade 8.1.4 -> latest, sort order subquery Michael Glaesemann <grzm@seespotcode.net>
Re: upgrade 8.1.4 -> latest, sort order subquery Richard Huxton <dev@archonet.com>
Re: upgrade 8.1.4 -> latest, sort order subquery Tom Lane <tgl@sss.pgh.pa.us>

On Jun 26, 2007, at 14:52 , jef peeraer wrote:

> The order is completely ignored, although there is an order by in  
> the view
> 'module_info'

I don't know what has caused the change in your system, but IIRC, the  
spec does not require a view to return rows in any particular order— 
I'm not even sure the spec allows ORDER BY in a view definition.  
(Whether or not PostgreSQL follows the spec in this case is another  
matter—I don't believe it does. So there's probably something a  
little more interesting going on here that others might help you with.)

A quick, spec-compliant fix would be to add an ORDER BY clause in the  
calling query.

Other than the row order, the results look correct, or am I missing  
something?

You might also look into using a set returning function, in which you  
can specify the order of the results.

Michael Glaesemann
grzm seespotcode net



В списке pgsql-general по дате отправления
От: Michael Glaesemann
Дата:
От: Tom Lane
Дата:
FAQ