Thread: Adding order bys to the view definitions (7.4)
Is there any case when PostgreSQL adds an order by to a view *definition* in 7.4? I have evidence that create view .... results in create view .... ORDER BY ... as shown by \d viewname. The view does a five way ordinary join. Any definitive answer would be very helpful. Thanks, Elein elein@varlena.com -------------------------------------------------------------- elein@varlena.com Varlena, LLC www.varlena.com (510)655-2584(o) (510)543-6079(c) PostgreSQL Consulting, Support & Training PostgreSQL General Bits http://www.varlena.com/GeneralBits/ -------------------------------------------------------------- I have always depended on the [QA] of strangers.
elein <elein@varlena.com> writes: > Is there any case when PostgreSQL adds an order by > to a view *definition* in 7.4? I believe SELECT DISTINCT (or DISTINCT ON) will do that. I have a vague recollection that GROUP BY might have done so at one time as well, but it seems not to anymore. regards, tom lane